Example of a proper GOTO statement : GOTO « PL SQL « Oracle PL / SQL






Example of a proper GOTO statement

  

SQL>
SQL> -- Example of a proper GOTO statement.
SQL> DECLARE
  2        s NUMBER := 1;
  3  BEGIN
  4       IF s = 1 THEN
  5            GOTO mybranch;
  6       ELSE
  7            s := 1;
  8       END IF;
  9       <<mybranch>>
 10       DBMS_OUTPUT.PUT_LINE('www.java2s.com');
 11       NULL;
 12  END;
 13  /
www.java2s.com

PL/SQL procedure successfully completed.

SQL>
           
         
    
  








Related examples in the same category

1.GOTO statement.
2.GOTO a Label
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