Allows one or more
procedural-sql-statementsto be iteratively executed.
LOOPstatement can be used to iteratively execute a sequence of one or more procedural SQL statement.
For information on
procedural-sql-statements, see Procedural SQL Statements.
labelappears at the beginning and at the end of the
LOOPstatement, the same value must be specified in both places.
labelis optional, however, if
labelappears at the end of the
LOOPstatement, it must also appear at the beginning.
labelis required at the beginning if the
LEAVEstatement is to be used to terminate the LOOP statement.
LOOPstatement itself does not include a mechanism for terminating the iteration.
LOOPstatement can be terminated by executing the
LOOPstatement will also terminate if an exception condition is raised, in accordance with the normal exception handling process.
LOOPstatement does not establish any form of local scope, as the compound statement does, the
labelis only specified to allow the
LEAVEstatement to be used to terminate the iteration.
ExampleL1: LOOP ... LEAVE L1; ... END LOOP L1;
For more information, see the Mimer SQL Programmer's Manual, Iteration
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40