DROP ROUTINE statement

Use the DROP ROUTINE statement to remove a user-defined routine (UDR) from the database.

This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

(1)
Notes:
Element Description Restrictions Syntax
owner Name of UDR owner Must own the UDR Owner name
parameter_type Data type of a parameter of routine The data type (or list of data types) must be the same type (and specified in the same order) as in the UDR definition Identifier; Data Type
routine Name of the UDR to drop The UDR must exist (that is, be registered) in the database Identifier

Usage

Dropping a UDR removes the text and executable versions of the UDR from the database. If you do not know whether a UDR is a user-defined function or a user-defined procedure, this statement instructs the database server to drop the specified user-defined function or user-defined procedure.

To use the DROP ROUTINE statement, you must be the owner of the UDR (and also hold the Resource privilege on the database), or you must have the DBA privilege. You must also hold the Usage privilege on the programming language in which the UDR is written. To drop an external user-defined routine, see also Dropping an External Routine.