ALTER PROCEDURE (SQL Form) Rules | Teradata Vantage - ALTER PROCEDURE (SQL Form) Rules - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™
  • 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 recompiled again.
  • 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 request.
    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.