DROP PROCEDURE
The DROP PROCEDURE
statement removes a standalone stored procedure from the database. Do not use this statement to remove a procedure that is part of a package.
Required privilege
No privilege is required for the procedure owner.
DROP ANY PROCEDURE
for another user's procedure.
Usage with TimesTen Scaleout
This statement is supported with TimesTen Scaleout.
SQL syntax
DROP PROCEDURE [Owner.]ProcedureName
Parameters
Parameter | Description |
---|---|
|
Name of the procedure to be dropped. |
Description
-
When you drop a procedure, TimesTen invalidates objects that depend on the dropped procedure. If you subsequently reference one of these objects, TimesTen attempts to recompile the object and returns an error message if you have not recreated the dropped procedure.
-
Do not use this statement to remove a procedure that is part of a package. Either drop the package or redefine the package without the procedure using the
CREATE PACKAGE
statement with theOR REPLACE
clause. -
To use the
DROP PROCEDURE
statement, you must have PL/SQL enabled in your database. If you do not have PL/SQL enabled in your database, an error is thrown.
Examples
The following statement drops the procedure myproc
and invalidates all objects that depend on myproc
:
Command> DROP PROCEDURE myproc; Procedure dropped.
If PL/SQL is not enabled in your database, TimesTen returns an error:
Command> DROP PROCEDURE myproc; 8501: PL/SQL feature not installed in this TimesTen databaseThe command failed.
See also