FOR LOOP with label : GOTO « PL SQL Statements « Oracle PL/SQL Tutorial






SQL>
SQL> set serveroutput on
SQL> set echo on

BEGIN
     FOR v_loopcounter IN 1..5 LOOP
          <<insideloop>>
          DBMS_OUTPUT.PUT_LINE('Loop counter is ' || v_loopcounter);
          GOTO insideloop;
     END LOOP;


END;
/








22.5.GOTO
22.5.1.Labels and the GOTO Statement
22.5.2.An Example of the GOTO Statement
22.5.3.GOTO statement
22.5.4.Demonstrate GOTO
22.5.5.FOR LOOP with label
22.5.6.JUMP out of a IF statement