Loop with label
SQL> SQL> SQL> DECLARE 2 lv_counter_num PLS_INTEGER := 0; 3 BEGIN 4 <<LOOP1>> 5 LOOP 6 <<LOOP2>> 7 LOOP 8 lv_counter_num := lv_counter_num + 1; 9 DBMS_OUTPUT.PUT_LINE('Counter: ' ||lv_counter_num); 10 EXIT LOOP1 WHEN lv_counter_num = 3; 11 END LOOP LOOP2; 12 DBMS_OUTPUT.PUT_LINE('Exited LOOP2'); 13 END LOOP LOOP1; 14 DBMS_OUTPUT.PUT_LINE('Exited LOOP1'); 15 END; 16 / Counter: 1 Counter: 2 Counter: 3 Exited LOOP1 PL/SQL procedure successfully completed. SQL>