PL/SQL GOTO StatementIn PL/SQL, GOTO statement makes you able to get an unconditional jump from the GOTO to a specific executable statement label in the same subprogram of the PL/SQL block. Here the label declaration which contains the label_name encapsulated within the << >> symbol and must be followed by at least one statement to execute. Syntax: Here the label declaration which contains the label_name encapsulated within the << >> symbol and must be followed by at least one statement to execute. Example of PL/SQL GOTO statementLet's take an example of PL/SQL GOTO statement. After the execution of above code, you will get the following result: value of a: 30 value of a: 31 value of a: 32 value of a: 33 value of a: 34 value of a: 36 value of a: 37 value of a: 38 value of a: 39 value of a: 40 value of a: 41 value of a: 42 value of a: 43 value of a: 44 value of a: 45 value of a: 46 value of a: 47 value of a: 48 value of a: 49 Statement processed. Restriction on GOTO statementFollowing is a list of some restrictions imposed on GOTO statement.
Next TopicPL/SQL Procedure |