EXEC | Teradata Vantage - EXEC - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
vqj1592443206677.ditamap
dita:ditavalPath
vqj1592443206677.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantageā„¢

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