Using GOTO : Goto « Transact SQL « SQL Server / T-SQL Tutorial






GOTO is used to jump to a label in your Transact-SQL batch. 

The syntax is:

GOTO label
label definition: code








20.9.Goto
20.9.1.Using GOTO
20.9.2.Goto statement
20.9.3.IF @@ERROR <> 0 GOTO TRAN_ABORT