Database Macros | SQL Fundamentals | VantageCloud Lake - Macros - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

A macro consists of one or more statements that can be run by performing a single statement. Each time the macro is performed, one or more rows of data can be returned.

A frequently used SQL statement or series of statements can be incorporated into a macro and defined using the SQL CREATE MACRO statement.

The statements in the macro are performed using the EXECUTE (Macro Form) statement.

A macro can include an EXECUTE statement that runs another macro.

Performing a macro is similar to performing a multiple-statement request.