ALTER PROCEDURE Statement

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

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

Syntax 5

ALTER PROCEDUREowner.]procedure-name ( [ parameter, …] )
[  RESULT (result-column, ...)]
EXTERNAL NAME ‘external-call’ LANGUAGE environment-name ] }

Parameters

Usage

The ALTER PROCEDURE statement must include the entire new procedure. You can use PROC as a synonym for PROCEDURE.

The ALTER PROCEDURE statement is identical in syntax to the CREATE PROCEDURE statement.

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).

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

Must be the owner of the procedure or a DBA. Automatic commit.

Related reference
CREATE PROCEDURE Statement