Executes an SQL macro.
ANSI Compliance
EXEC is a Teradata extension to the ANSI/ISO SQL:2011 standard.
Required Privileges
None.
Invocation
Executable.
Embedded SQL only.
Syntax
EXEC macro_name [ ( parameter_list ) ]
Syntax Elements
- macro_name
- The name of the macro to be executed.
- parameter_list
- The SQL macro parameters.
Usage Notes
The statement must be spelled EXEC, not EXECUTE, to distinguish it from the dynamic SQL statement EXECUTE.
Any macro specified by macro_name can contain no more than one Teradata SQL statement.
Any macro specified by macro_name cannot return data.
You must use a macro cursor to execute the following types of macros:
- Multistatement
- Data returning