Search notes:

SQL Server: variables

Variables are declared with the declare statement which associates the variable with a data type.
Values are assigned to variables with either the

Scope

The scope of a variable does not extend over multiple batches.

See also

Some »predefined« variables that start with @@
T-SQL

Index