ALTER ROUTINE statement

Use the ALTER ROUTINE statement to change the routine modifiers or pathname of a previously defined user-defined routine (UDR), This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

(explicit id altrou002) altrou002 (explicit id altrou003) altrou003 (explicit id altrou004) altrou004 (explicit id altrou005) altrou005 ALTER { ROUTINEroutine( [ parameter_type ] ) | SPECIFIC ROUTINE <Specific Name>[] } WITH( { | { ADD | MODIFY | DROP } <Routine Modifier>[] | [] MODIFY EXTERNAL NAME = <Shared-Object Filename>[] } )
Element Description Restrictions Syntax
routine User-defined routine to modify Must be registered in the database. If the name does not uniquely identify a routine, 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 routine. Data Type

Usage

The ALTER ROUTINE statement allows you to modify a previously defined UDR to tune its performance by modifying characteristics that control how the UDR executes. You can also add or replace related UDRs that provide alternatives for the optimizer, which can improve performance.

This statement is useful when you do not know whether a UDR is a user-defined function or a user-defined procedure. When you use this statement, the database server alters the appropriate user-defined procedure or user-defined function.

All modifications take effect on the next invocation of the UDR.

Only the UDR owner or the DBA can use the ALTER ROUTINE statement.

3 External routines only