It is possible to define several variables in a single Declare statement. : Declare « Transact SQL « SQL Server / T-SQL Tutorial






4>
5>
6> Declare     @LastName varchar(50),
7>             @FirstName varchar(20),
8>             @BirthDate smalldatetime
9> GO
1>








20.1.Declare
20.1.1.The DECLARE statement has a pretty simple syntax:
20.1.2.It is possible to define several variables in a single Declare statement.
20.1.3.The names of variables must begin with @
20.1.4.Simple SELECT query written using variables for field names.
20.1.5.Declare a table type variable and query it
20.1.6.DECLARE @Out Int (get value out of a procedure)
20.1.7.DECLARE @Out Int