0 votes
in PL/SQL by
Is It Possible To Label A Loop? If Yes, Then Explain what Is Its Benefit?

1 Answer

0 votes
by

Yes, It is possible to label a loop similar to a PL/SQL block. Loop labels are undeclared identifiers enclosed within the double angle brackets. This helps in better readability in case of nested loops. In addition, this helps in using the EXIT statement with the loop label in the nested loops. Label of a loop should appear before the LOOP statement, as shown in the following code snippet:

«first»

LOOP

-----

«second» 

LOOP

       -------

      EXIT second WHEN ------ 

      END LOOP second; 

END LOOP first; 

Related questions

0 votes
asked Apr 8, 2023 in Amazon QuickSight by Robindeniel
0 votes
asked Mar 15, 2021 in PL/SQL by Robindeniel
...