DROP FUNCTION

The DROP FUNCTION statement drops a function from your database. Functions are added to the database with the   CREATE FUNCTION statement.

Syntax

DROP FUNCTION function-name

function-Name

The name of the function that you want to drop from your database.

Usage

Use this statement to drop a function from your database. It is valid only if there is exactly one function instance with the function-name in the schema. The specified function can have any number of parameters defined for it.

An error will occur in any of the following circumstances:

  • If no function with the indicated name exists in the named or implied schema (the error is SQLSTATE 42704)
  • If there is more than one specific instance of the function in the named or implied schema
  • If you try to drop a user-defined function that is invoked in the generation-clause of a generated column
  • If you try to drop a user-defined function that is invoked in a view

Example

splice> DROP FUNCTION TO_DEGREES;
0 rows inserted/updated/deleted

See Also