The PL/SQL LOOP allows you to iterative sequence of statements repeatedly for a specified number of times. The EXIT WHEN is used to terminate the loop iteration. Here remember that the EXIT and EXIT WHEN statement can be used interchangeably.
To terminate the loop iteration, use the following syntax:
Let's understand how it works: