22. 3. 2. Simple Loops |
|
A simple loop runs until you explicitly end the loop. The syntax for a simple loop is as follows: |
LOOP
statements
END LOOP;
|
|
To end the loop, you use either an EXIT or EXIT WHEN statement. |
The EXIT statement ends a loop immediately. |
EXIT WHEN statement ends a loop when a specified condition occurs. |