DROP FUNCTION
The DROP FUNCTION
statement removes a standalone stored function from the database. Do not use this statement to remove a function that is part of a package.
Required privilege
No privilege is required for the function owner.
DROP ANY PROCEDURE
for another user's function.
Usage with TimesTen Scaleout
This statement is supported with TimesTen Scaleout.
SQL syntax
DROP FUNCTION [Owner.]FunctionName
Parameters
Parameter | Description |
---|---|
|
Name of the function to be dropped. |
Description
-
When you drop a function, TimesTen invalidates objects that depend on the dropped function. 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 function.
-
Do not use this statement to remove a function that is part of a package. Either drop the package or redefine the package without the function using the
CREATE PACKAGE
statement with theOR REPLACE
clause. -
To use the
DROP FUNCTION
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 function myfunc
and invalidates all objects that depend on myfunc
:
Command> DROP FUNCTION myfunc; Function dropped.
If PL/SQL is not enabled in your database, TimesTen returns an error:
Command> DROP FUNCTION myfunc; 8501: PL/SQL feature not installed in this TimesTen database The command failed.
See also