GOTO Statement in Sql Server

Alters the flow of execution to a label. The Transact-SQL statement or statements that follow GOTO
are skipped and processing continues at the label.

Syntax
Define the label:   
label:   
Alter the execution:  
GOTO label 
Example:
select * from country
    GOTO Branch_Three;
select * from Company
  Branch_Three:  
    SELECT getdate()

Post a Comment

0 Comments