Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    15

    Unanswered: 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
    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: How to Delete Multiple Stored Procedures ?

    Originally 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:

    Code:
    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;
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •