Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
Read in English
Read in English Edit
Twitter LinkedIn Facebook Email

Control-of-Flow

  • Article
  • 02/28/2023
  • 2 minutes to read

In this article

Applies to: SQL Server Azure SQL Managed Instance

The Transact-SQL control-of-flow language keywords are:

BEGIN...END

RETURN

BREAK

THROW

CONTINUE

TRY...CATCH

GOTO label

WAITFOR

IF...ELSE

WHILE

See Also

CASE (Transact-SQL)
Slash Star (Block Comment) (Transact-SQL)
-- (Comment) (Transact-SQL)
DECLARE @local_variable (Transact-SQL)
EXECUTE (Transact-SQL)
PRINT (Transact-SQL)
RAISERROR (Transact-SQL)


Additional resources

  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023

Additional resources

In this article

  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023