Wednesday, March 7, 2012

How to Delete Multiple Stored Procedures ?

I would Like to delete all stored procedures from the database using sql statement, wild cards with DROP PROCEDURE , dont work
ThanksOriginally posted by pkrol
I would Like to delete all stored procedures from the database using sql statement, wild cards with DROP PROCEDURE , dont work
Thanks
Use PL/SQL:

BEGIN
FOR r in (SELECT object_name FROM user_objects WHERE object_type = 'PROCEDURE' )
LOOP
EXECUTE IMMEDIATE 'DROP PROCEDURE '||r.object_name;
END LOOP;
END;
/

No comments:

Post a Comment