Categories:

UDF (User-Defined Function) & Stored Procedure DDL

DROP FUNCTION

Removes the specified user-defined function (UDF) from the current/specified schema.

See also:

CREATE FUNCTION , SHOW FUNCTIONS

Syntax

DROP FUNCTION [ IF EXISTS ] <name> ( [ <arg_data_type> , ... ] )

Parameters

name

Specifies the identifier for the UDF to drop. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

arg_data_type [ , ... ]

Specifies the data type of the argument(s), if any, for the UDF. The argument types are necessary because UDFs support name overloading (i.e. two UDFs in the same schema can have the same name) and the argument types are used to identify the UDF you wish to drop.

Usage Notes

  • Dropped functions cannot be recovered; they must be recreated.

Examples

DROP FUNCTION multiply(number, number);

--------------------------------+
             status             |
--------------------------------+
 MULTIPLY successfully dropped. |
--------------------------------+