GOTO a Label : GOTO « PL SQL « Oracle PL / SQL





GOTO a Label

   
SQL>
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> --

   
    
  










Related examples in the same category

1.GOTO statement.
2.Example of a proper GOTO statement
3.Use GoTO to jump out of a loop
4.This script demonstrates GOTO
5.Use sequential control with the GOTO statement and a block label