Replaces an existing procedure with a modified version. Include the entire modified procedure in the ALTER PROCEDURE statement, and reassign user permissions on the procedure.
Syntax 1
ALTER PROCEDURE [ owner.]procedure-name procedure-definition
Syntax 2
ALTER PROCEDURE [ owner.]procedure-name REPLICATE { ON | OFF }
Syntax 3
ALTER PROCEDURE [ owner.]procedure-name SET HIDDEN
Syntax 4
ALTER PROCEDURE [ owner.]procedure-name RECOMPILE
ALTER PROCEDURE [ owner.]procedure-name ( [ parameter, …] ) [ RESULT (result-column, ...)] EXTERNAL NAME ‘external-call’ [ LANGUAGE JAVA [ environment-name ] } external-call - (back to Syntax 5) [column-name:]function-name@library; ... environment-name - (back to Syntax 5) DISALLOW | ALLOW SERVER SIDE REQUESTS
The procedure definition is not changed by recompiling. You can recompile procedures with definitions hidden with the SET HIDDEN clause, but their definitions remain hidden.
The ALTER PROCEDURE statement must include the entire new procedure. You can use PROC as a synonym for PROCEDURE. Both Watcom and Transact-SQL® dialect procedures can be altered through the use of ALTER PROCEDURE. Existing permissions on the procedure are not changed. If you execute DROP PROCEDURE followed by CREATE PROCEDURE, execute permissions are reassigned.
You cannot combine Syntax 2 with Syntax 1.
When using the ALTER PROCEDURE statement for table UDFs, the same set of restrictions apply as for the CREATE PROCEDURE Statement (External Procedures).