This Oracle tutorial explains how to use the GOTO statement in Oracle with syntax and examples.
The GOTO statement causes the code to branch to the label after the GOTO statement.
The syntax for the GOTO statement in Oracle/PLSQL consists of two parts - the GOTO statement and the Label Declaration:
The GOTO statement consists of the GOTO keyword, followed by a label_name.
The Label Declaration consists of the label_name encapsulated in << >>, followed by at least one statement to execute.
Let's look at an Oracle example that uses the GOTO statement.
In this GOTO example, we have created two GOTO statements. The first one is called default_number and the second one is called increment_number.