ALTER PROCEDURE (SQL Form) Rules
If a procedure is recompiled by an ALTER PROCEDURE request with NO SPL option, the
source text of the procedure is deleted from the system and the procedure cannot be
You can alter a procedure in the same session mode in which the procedure was originally
created. Procedures created in ANSI session mode cannot be recompiled in Teradata
session mode and vice versa.
An ALTER PROCEDURE request cannot be specified inside a procedure body.
If you do not specify any compile-time options with an ALTER PROCEDURE request, the
options with which the procedure was previously created, replaced, or recompiled apply.
If some compile-time options are specified with an ALTER PROCEDURE request, the unspecified
options default to the existing options of the procedure.
You must specify COMMIT after an ALTER PROCEDURE request is executed in ANSI mode
transactions, as true for all DDL statements.
In Teradata session mode, ALTER PROCEDURE must be the last request in a transaction.
All the statements other than DML, DDL, and DCL statements within an SQL procedure
are validated syntactically and semantically during the execution of an ALTER PROCEDURE
For DML, DDL, and DCL statements within the procedure body, the validation includes
syntactic validation and name resolution but does not include the following.
Access privilege checks
Data type compatibility
If the execution of an ALTER PROCEDURE request fails, the existing SQL create text
for the procedure is retained.
Errors or warnings generated during the recompilation of a procedure are reported
as part of the SUCCESS or OK response. The activity count in the parcel is set to
the total number of errors and warnings.