1DECLARE @table_variable_name TABLE (
2 column_list
3);
4
5Example:
6DECLARE @product_table TABLE (
7 product_name VARCHAR(MAX) NOT NULL,
8 brand_id INT NOT NULL,
9 list_price DEC(11,2) NOT NULL
10);
1-- Declare the variable to be used.
2DECLARE @MyCounter int;
3
4-- Initialize the variable.
5SET @MyCounter = 0;