|
|
LOOP
Allows one or more
procedural-sql-statementsto be iteratively executed.Usage
Description
The
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.Restrictions
If
labelappears at the beginning and at the end of theLOOPstatement, the same value must be specified in both places.Specifying
labelis optional, however, iflabelappears at the end of theLOOPstatement, it must also appear at the beginning.A
labelis required at the beginning if theLEAVEstatement is to be used to terminate the LOOP statement.Notes
The
LOOPstatement itself does not include a mechanism for terminating the iteration.The
LOOPstatement can be terminated by executing theLEAVEstatement. TheLOOPstatement will also terminate if an exception condition is raised, in accordance with the normal exception handling process.The
LOOPstatement does not establish any form of local scope, as the compound statement does, thelabelis only specified to allow theLEAVEstatement to be used to terminate the iteration.Example
L1: LOOP ... LEAVE L1; ... END LOOP L1;For more information, see the Mimer SQL Programmer's Manual, Iteration
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|