Collection Contents Index ALTER DBSPACE statement ALTER SERVER statement pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

ALTER PROCEDURE statement


Function 

To replace a procedure with a modified version. You must include the entire new procedure in the ALTER PROCEDURE statement, and reassign user permissions on the procedure.

Also, to enable and disable a procedure for replication with Sybase Replication Server.

Syntax 1 

ALTER PROCEDURE [ owner.]procedure-name ( [ parameter , ... ] )
... [ RESULT ( result-column , ... ) ]
... [ ON EXCEPTION RESUME ]
... compound-statement

Syntax 2 

ALTER PROCEDURE [ owner.]procedure-name
... REPLICATE { ON | OFF }

Parameters 

parameter:
parameter_mode parameter-name data-type
... [ DEFAULT expression ] | SQLCODE | SQLSTATE

parameter_mode:
IN | OUT | INOUT

result-column:
column-name data-type

Permissions 

Must be the owner of the procedure or be DBA.

Side effects 

Automatic commit.

See also 

CREATE PROCEDURE statement

Description 

Syntax 1     The ALTER PROCEDURE statement is identical in syntax to the CREATE PROCEDURE statement except for the first word. The ALTER PROCEDURE statement replaces the entire contents of the CREATE PROCEDURE statement with the contents of the ALTER PROCEDURE statement. Existing permissions on the procedure are maintained, and do not have to be reassigned. If a DROP PROCEDURE and CREATE PROCEDURE were carried out, execute permissions would have to be reassigned.

Syntax 2     If a procedure is to be replicated to other sites, you must set REPLICATE ON for the procedure.

Syntax 2 of the ALTER PROCEDURE statement has the same effect as the sp_setreplicate or sp_setrepproc 'table' Adaptive Server Enterprise system procedures.

You cannot combine Syntax 2 with Syntax 1.

Standards and compatibility 


Collection Contents Index ALTER DBSPACE statement ALTER SERVER statement pdf/chap9.pdf