You can use the DROP FUNCTION statement to drop an independent function from the database.
Notice
If the function to be dropped is part of a program package, do not use this statement to drop it. Instead, use the
DROP PACKAGEstatement to drop the entire program package, or use aCREATE PACKAGEstatement with anOR REPLACEclause to redefine a program package without this function.
Prerequisites
The function must be located in your own schema, or you must have the ALTER ANY PROCEDURE system privilege.
Syntax
Syntax of drop_function:
DROP FUNCTION [ schema. ] function_name ;
Semantics
| Syntax | Keyword or syntax node | Description |
|---|---|---|
| drop_function | schema | The name of the schema where the function is located. The default value is your schema. |
| drop_function | function_name | The name of the function to be dropped. |
Examples
Drop the function named sys.get_salary_by_dept.
DROP FUNCTION sys.get_salary_by_dept;