DROP Procedure but Test if exist
Hello,
I'm not a guru on SQL and PL/SQL but the straight forward things I can solve.
But now I want to delete some stored procedures by a SQL script if possible.
This is working fine the first time when I run the install script:
DROP PROCDURE 'procedurename';
But the next time when I execute the script I get a error like "Procedure doesn't exist".
I don't want this error so how can I solve this.
I was thinking about something like:
DROP PROCEDURE IF EXIST 'procedurename';
or
EXECUTE IMMEDIATE 'DROP PROCEDURE procedurename'
But these two are not working.
Is this possible or do I need to build something in PL/SQL?
Nico