Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


REPEAT


Allows one or more procedural-sql-statements to be iteratively executed.



Usage

Procedural.

Description

The REPEAT statement can be used to iteratively execute a sequence of one or more procedural-sql-statements.

The iteration continues until the search-condition evaluates to true.

For information on procedural-sql-statements, see Procedural SQL Statements.

Restrictions

If label appears at the beginning and at the end of the REPEAT statement, the same value must be specified in both places.

Specifying label is optional, however, if label appears at the end of the REPEAT statement, it must also appear at the beginning.

A label is required at the beginning if the LEAVE statement is to be used to terminate the REPEAT statement.

Notes

The REPEAT statement may be terminated by executing the LEAVE statement using label. It will also terminate if an exception condition is raised, in accordance with the normal exception handling process.

Example

 SET I = 0;
 L1:
 REPEAT
   ...
   SET I = I + 1;
 UNTIL I > 10
 END REPEAT L1;
 

For more information, see the Mimer SQL Programmer's Manual, Iteration Using REPEAT.

Standard Compliance

Standard
Compliance
Comments
SQL-2003
Features outside core
Feature P002, "Computational completeness".


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX