ALTER FUNCTION statement
Use the ALTER FUNCTION statement to change the routine modifiers or pathname of a user-defined function. This statement is an extension to the ANSI/ISO standard for SQL.
Syntax
Element | Description | Restrictions | Syntax |
---|---|---|---|
function | User-defined function to be modified | Must 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 a parameter | Must be the same data types (and specified in the same order) as in the definition of function. | Data Type |
Usage
The ALTER FUNCTION statement can modify a user-defined function to tune its performance by modifying characteristics that control how the function executes. You can also add or replace related user-defined routines (UDRs) that provide alternatives for the query optimizer, which can improve performance.
All modifications take effect on the next invocation of the function.
Only the UDR owner or the DBA can use the ALTER FUNCTION statement.