begin...end

Encloses a series of SQL statements so that control-of-flow language, such as if...else, can affect the performance of the entire group.

Syntax

begin 
	statement block
end

Parameters

Examples

Usage

begin...end blocks can nest within other begin...end blocks.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

No permission is required to use begin...end.

Related reference
if...else