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.