日期:2014-05-17 浏览次数:21094 次
IF exists(SELECT NAME FROM sysobjects WHERE NAME = 'LoginCheck' AND type = 'p') DROP PROCEDURE LoginCheck
declare
 i int;
begin
  select count(*) into i from user_objects where object_name=upper('LoginCheck') and object_Type=upper('procedure');
  if i>0 then
    execute immediate 'DROP PROCEDURE LoginCheck';
  end if;
end;
------解决方案--------------------
begin
 for i in (select null from user_objects where object_name=upper('LoginCheck') and object_Type=upper('procedure')) loop
   execute immediate 'DROP PROCEDURE LoginCheck';
 end loop;
end;