Loop Statements
Simple LOOP Statements
The syntax diagram is as follows.
Example:
The loop must be exploited together with EXIT; otherwise, a dead loop occurs.
WHILE-LOOP Statements
The syntax diagram is as follows.
If the conditional expression is true, a series of statements in the WHILE statement are repeatedly executed and the condition is decided each time the loop body is executed.
Examples
FOR_LOOP (Integer variable) Statement
The syntax diagram is as follows.
- The variable name is automatically defined as the integer type and exists only in this loop. The variable name falls between lower_bound and upper_bound.
- When the keyword REVERSE is used, the lower bound must be greater than or equal to the upper bound; otherwise, the loop body is not executed.
Example:
FOR_LOOP Query Statements
The syntax diagram is as follows.
The variable target is automatically defined, its type is the same as that in the query result, and it is valid only in this loop. The target value is the query result.
Example:
FORALL Batch Query Statements
The syntax diagram is as follows.
The variable index is automatically defined as the integer type and exists only in this loop. The index value falls between low_bound and upper_bound.
Example:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.