FOR Syntax Elements - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
IF_statement
See IF.
CASE_statement
See CASE.
label_name
An optional label for the FOR statement.
If an ending-label is specified, you must specify a beginning-label that is equivalent to the ending-label. The beginning-label must be terminated by a colon character (:).
The label name of the BEGIN END compound statement cannot be reused in an iteration statement. One label name cannot be reused within one group of nested FOR statements, but can be reused for different non-nesting iteration statements.
for_loop_variable
The name of the loop.
cursor_name
The name of the cursor.
Used for updatable cursors as the object of the WHERE CURRENT OF clause.
cursor_specification
A single SELECT statement used as the cursor.
In read-only cursors, the single SELECT statement can contain one SELECT or multiple SELECTs that use set operators like UNION, INTERSECT or MINUS.
Updatable cursors do not support the set operators.
statement
One or more DML, DDL, DCL statements, including dynamic SQL statements, or control statements, including BEGIN END compound statements.