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
set
statement
or the
SQL
select
statement
.
Scope
The scope of a variable does not extend over multiple
batches
.
See also
Some »predefined«
variables that start with
@@
T-SQL
Index