Continues execution at the beginning of a labeled procedural-sql-statement.
The ITERATE statement can be used to skip the remaining statements within a labeled procedural-sql-statement. The execution will continue at the beginning of the labeled procedural-sql-statement. The statement must be a FOR, LOOP, REPEAT or WHILE statement.
For a list of procedural-sql-statements, see Procedural SQL Statements.
The label is the beginning label of a procedural-sql-statements within the scope containing the ITERATE statement.
A procedural-sql-statement must have a beginning label if ITERATE is to be used.
If the ITERATE statement is contained in any compound statements which are enclosed in the procedural-sql-statement defined by the label the following actions will take place:
- Every open cursor declared in the compound statements is closed.
- All variables, cursors and handlers declared in the compound statements are destroyed.
- All condition names declared in the compound statements cease to be defined.
ExampleL1: LOOP IF ... LEAVE L1; ... END LOOP L1;
For more information, see Mimer SQL Programmer's Manual, chapter 12, Iteration.
SQL-99 YES Fully compliant.
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40