JUMP out of a IF statement : GOTO « PL SQL Statements « Oracle PL/SQL Tutorial






SQL>
SQL> set serveroutput on
SQL> set echo on
SQL>
SQL>    DECLARE
  2          v_Status NUMBER := 1;
  3     BEGIN
  4          IF v_Status = 1 THEN
  5               GOTO mybranch;
  6          ELSE
  7               v_Status := 1;
  8          END IF;
  9          <<mybranch>>
 10          NULL;
 11    END;
 12  /

PL/SQL procedure successfully completed.

SQL>








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