91-9990449935 0120-4256464 |
PL/SQL Exit Loop (Basic Loop)PL/SQL exit loop is used when a set of statements is to be executed at least once before the termination of the loop. There must be an EXIT condition specified in the loop, otherwise the loop will get into an infinite number of iterations. After the occurrence of EXIT condition, the process exits the loop. Syntax of basic loop: Syntax of exit loop: Example of PL/SQL EXIT LoopLet's take a simple example to explain it well: After the execution of the above code, you will get the following result: 1 2 3 4 5 6 7 8 9 10 Note: You must follow these steps while using PL/SQL Exit Loop.
PL/SQL EXIT Loop Example 2Output: 100 200 300 400 500 600 700 800 900 1000
Next TopicPL/SQL While Loop
|