Dropping a Procedure or Function

Previous
Previous
Next
Next

You can drop a procedure or function from the database with the Object Browser page or the SQL DROP statement.

To use the Object Browser page to drop procedures and functions:

  1. Log in to the Database Home Page. See "Logging in to the Database Home Page". To run the examples in this guide, log in as user HR with your password for the HR account.

  2. On the Database Home Page, click the Object Browser icon.

  3. In the object list, select Procedures or Functions, then click the name of the procedure or function you want to drop.

  4. Click the Drop button.

  5. Click the Finish button to confirm the action.

To drop procedures or functions with SQL statements, use the SQL DROP PROCEDURE or DROP FUNCTION statement, as shown in Example: Dropping Subprograms With the DROP Statement.

Dropping Subprograms With the DROP Statement

-- drop the procedure award_bonus to remove from the database
DROP PROCEDURE award_bonus;

-- drop the function emp_sal_ranking to remove from database
DROP FUNCTION emp_sal_ranking;