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

(explicit id altfunc002) altfunc002 (explicit id altfunc003) altfunc003 (explicit id altfunc004) altfunc004 (explicit id altfunc005) altfunc005 ALTER { FUNCTIONfunction( [ parameter_type ] ) | SPECIFIC FUNCTION <Specific Name>[] } WITH( { | { ADD | MODIFY | DROP } <Routine Modifier>[] | [] MODIFY EXTERNAL NAME = <Shared-Object Filename>[] } )
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.

3 External routines only