Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

drop procedure if exists

785209Aug 15 2010 — edited Aug 15 2010
hello,

how can i create script that drop procedure just if procedure exists ?

i try to use :

DROP PROCEDURE if exists add_fe;

and also :


declare
numOfRows number;
begin
select count(*) into numOfRows from user_source where TYPE='PROCEDURE' and NAME='ADD_FE';
if numOfRows != 0
then
execute immediate
'
drop procedure ADD_FE;
';
end if;
end;

but without success at all.

thank u,
adi damty
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2010
Added on Aug 15 2010
5 comments
7,114 views