The DROP FUNCTION statement is used to drop an independent function from the database.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Notice
Do not use this statement to drop a function that is part of a package. To drop the package, use the DROP PACKAGE statement. To redefine the package without the function, use the CREATE PACKAGE statement with the OR REPLACE clause.
Prerequisites
The function must be in the current user's schema or the user must have the ALTER ANY PROCEDURE system privilege.
Syntax
The syntax of drop_function is as follows:
DROP FUNCTION [ schema. ] function_name ;
Semantics
| Syntax | Keywords or syntax nodes | Description |
|---|---|---|
| drop_function | schema | The name of the schema where the function is located. The default value is the current user's schema. |
| drop_function | function_name | The name of the function to be dropped. |
Examples
Drop the function sys.get_salary_by_dept.
DROP FUNCTION sys.get_salary_by_dept;
