The syntax of the DECLARE statement for a table variable : Table Variable « Transact SQL « SQL Server / T-SQL Tutorial






DECLARE @table_name TABLE
(column_name_1 data_type [column_attributes]
[, column_name_2 data_type [column_attributes]]...
[, table_attributes])








20.5.Table Variable
20.5.1.The syntax of the DECLARE statement for a table variable
20.5.2.Inline Table-Valued Functions
20.5.3.Insert into a table variable
20.5.4.Use Table Variables as a table
20.5.5.Creating a Table Variable to Hold a Temporary Result Set