Loop Label PL/SQL

PL/SQL Loop Label:

The PL/SQL loop can be labeled by loop labels.

PL/SQL Loop Label Syntax:

<< label >PL/SQL loop label example:
DECLARE
   i number(1);
   j number(1);
BEGIN
   << outer_loop >>
   FOR i IN 1..5 LOOP
      << inner_loop >>
      FOR j IN 1..5 LOOP
         dbms_output.put_line('i is: '|| i || ' and j is: ' || j);
      END loop inner_loop;
   END loop outer_loop;
END;
/

Output:

i is: 1 and j is: 1
i is: 1 and j is: 2
i is: 1 and j is: 3
i is: 1 and j is: 4
i is: 1 and j is: 5
i is: 2 and j is: 1
i is: 2 and j is: 2
i is: 2 and j is: 3
i is: 2 and j is: 4
i is: 2 and j is: 5
i is: 3 and j is: 1
i is: 3 and j is: 2
i is: 3 and j is: 3
i is: 3 and j is: 4
i is: 3 and j is: 5
i is: 4 and j is: 1
i is: 4 and j is: 2
i is: 4 and j is: 3
i is: 4 and j is: 4
i is: 4 and j is: 5
i is: 5 and j is: 1
i is: 5 and j is: 2
i is: 5 and j is: 3
i is: 5 and j is: 4
i is: 5 and j is: 5