DROP FUNCTION
Description
Drops an existing function.
Precautions
- If a function involves operations on temporary tables, DROP FUNCTION cannot be used.
- Only the function owner or a user granted with the DROP permission can run the DROP FUNCTION command. System administrators have this permission by default.
Syntax
DROP FUNCTION [ IF EXISTS ] function_name
[ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ]; Parameters
- IF EXISTS
Reports a notice instead of an error if the specified function does not exist.
- function_name
Specifies the name of the function to be dropped.
Value range: an existing function name.
- argmode
Specifies the parameter mode of the function.
- argname
Specifies the parameter name of the function.
- argtype
Specifies the parameter type of the function.
- CASCADE | RESTRICT
- CASCADE: automatically drops the objects that depend on the function.
- RESTRICT: refuses to drop the function if any objects depend on it. This is the default action.
Examples
For details, see Examples.