|
|
WHILE
Allows one or more procedural SQL statements to be iteratively executed.
Usage
Description
The
WHILEstatement can be used to iteratively execute a sequence of one or moreprocedural-sql-statements.The iteration continues as long as
search-conditionevaluates to true.For information on
procedural-sql-statements, see Procedural SQL Statements.Restrictions
If
labelappears at the beginning and at the end of theWHILEstatement, the same value must be specified in both places.Specifying
labelis optional, however, iflabelappears at the end of theWHILEstatement, it must also appear at the beginning.A label is required at the beginning if the
LEAVEstatement is to be used to terminate theWHILEstatement.Notes
The
WHILEstatement may be terminated by executing theLEAVEstatement usinglabel. It will also terminate if an exception condition is raised, in accordance with the normal exception handling process.Example
SET I = 0; L1: WHILE I <= 10 DO ... SET I = I + 1; END WHILE L1;For more information, see the Mimer SQL Programmer's Manual, Iteration Using WHILE.
Standard Compliance
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|