A WHILE, LOOP, FOR, or REPEAT statement.
See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL, B035-1148 for details.
You can specify these options for iteration statements.
- WHILE
- Keyword introducing an iteration statement to repeat the execution of one or more statements within its defined scope.
- DO
- Keyword introducing the sequence of statements to be performed in the WHILE statement.
- END WHILE
- Keywords indicating the ending of the sequence of statements in the WHILE statement.
- LOOP
- Keyword introducing an iteration statement that repeats the execution of one or more statements embedded within the defined loop.
- END LOOP
- Keywords that terminate a LOOP.
- FOR
- Keyword introducing an iteration statement to repeat the execution of one or more statements for each row fetched by the cursor.
- for_loop_variable
- Name of the FOR loop.
- cursor_name
- Name of the cursor.
- CURSOR FOR
- Optional keywords qualifying the cursor_name as the cursor for the statement set to follow.
- cursor_specification
- The SELECT statement specifying the column names or expressions from which to fetch data rows in the CURSOR statement.
- DO
- Keyword introducing the sequence of statements to be performed in the CURSOR statement.
- END FOR
- Keywords ending the CURSOR statement.
- REPEAT
- Keyword introducing the iteration statement that repeats the execution of one or more statements within the defined REPEAT statement.
- UNTIL
- Keyword introducing a conditional expression to qualify the statements in the loop.
- END REPEAT
- Keywords ending the REPEAT statement.