Rules for Executing SQL Procedures and External Stored Procedures - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
vjt1596846980081.ditamap
dita:ditavalPath
vjt1596846980081.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantageā„¢
The following rules apply to executing SQL procedures and external procedures:
  • SQL procedures and external procedures are platform-specific. A procedure created under one platform can only be run on that platform.
  • CALL can be performed only in Teradata or ANSI session modes.

    If an SQL procedure is created in Teradata session mode, it cannot be executed in ANSI session mode and vice versa.

    CALL cannot be used in 2PC (Two Phase Commit) mode.

  • Additionally, CALL can be issued in Prepare or Execute mode using CLI applications.
  • LOCKING modifiers cannot be used with a CALL statement.
  • You can submit a CALL statement from a macro if the CALL statement is the only statement inside the macro.
  • Only one nested procedure call can be an external procedure, the rest must be SQL procedures. For example, an external procedure cannot call an SQL procedure that in turn calls an external procedure.