91-9990449935 0120-4256464 |
PL/SQL FOR LoopPL/SQL for loop is used when when you want to execute a set of statements for a predetermined number of times. The loop is iterated between the start and end integer values. The counter is always incremented by 1 and once the counter reaches the value of end integer, the loop ends. Syntax of for loop:
PL/SQL For Loop Example 1Let's see a simple example of PL/SQL FOR loop. 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 WHILE Loop.
PL/SQL For Loop Example 2Output: 10 20 30 40 50 60 70 80 90 100 PL/SQL For Loop REVERSE Example 3Let's see an example of PL/SQL for loop where we are using REVERSE keyword. Output: 100 90 80 70 60 50 40 30 20 10
Next TopicPL/SQL Continue
|