create temp table in sql
snippet in sql

tsql create temp table

user9329

CREATE TABLE #haro_products (
    product_name VARCHAR(MAX),
    list_price DEC(10,2)
);

create temp table in sql

user2972

-- CREATE TEMP TABLE 
Create Table #MyTempTable (
    EmployeeID int
);

sql server: creating temp table by selecting records from other tables

user822

SELECT *
INTO #<Temp_Table_Name>
FROM <TableName>
WHERE <Conditions>
ORDER BY <Col_Names OrderSeq>
OPTION <Options>