Using SET to Assign Variables : Set « Transact SQL « SQL Server / T-SQL Tutorial






5> DECLARE @MyNumber Int, @MyResult Int
6> SET @MyNumber = 144
7> GO
1>








20.4.Set
20.4.1.Syntax for Variable Assignment with the SET Statement
20.4.2.Using SET to Assign Variables
20.4.3.Assign the function result to the variable
20.4.4.Return the variable value
20.4.5.Use set command to update a variable
20.4.6.Concatenating Variables
20.4.7.SET variable and column in one command