Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL.
>>-DROP---------------------------------------------------------> >--+-+-----------+--FUNCTION--function--+--------------------------+-+->< | '- owner--.-' | .-,--------------. | | | | V | | | | '-(----parameter_type-+--)-' | | (1) | '-SPECIFIC FUNCTION--| Specific Name |----------------------------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
function | Name of the user-defined function to be dropped | Must exist (that is, be registered) in the database. If the name does not uniquely identify a function, you must enter one or more appropriate values for parameter_type. | Identifier |
parameter_type | Data type of the parameter | The data type (or list of data types) must be the same data types (and specified in the same order) as those specified in the CREATE FUNCTION statement when the function was created | Identifier; Data Type |
Dropping a user-defined function removes the text and executable versions of the function from the database.
If you do not know if a UDR is a user-defined function or a user-defined procedure, you can drop the UDR by using the DROP ROUTINE statement.
To use the DROP FUNCTION statement, you must be the owner of the user-defined function or have the DBA privilege. To drop an external user-defined function, see also Dropping an External Routine.
You cannot drop an SPL function from within the same SPL function.
Dynamic Server can resolve a function by its specific name, if the function definition declared a specific name. If you use the specific name in this statement, you must also use the keyword SPECIFIC, as in the following example:
DROP SPECIFIC FUNCTION compare_point
Otherwise, if the function name is not unique within the database, you must specify enough parameter_type information to disambiguate the name. If you use parameter data types to identify a user-defined function, they follow the function name, as in the following example:
DROP FUNCTION compare (int, int)
But the database server returns an error if it cannot resolve an ambiguous function name whose signature differs from that of another function only in an unnamed ROW-type parameter. (This error cannot be anticipated by the database server when the ambiguous function is defined.)
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]