creating a temp table in sql server code example
Example: sql server: creating temp table by selecting records from other tables
SELECT *
INTO #<Temp_Table_Name>
FROM <TableName>
WHERE <Conditions>
ORDER BY <Col_Names OrderSeq>
OPTION <Options>
SELECT *
INTO #<Temp_Table_Name>
FROM <TableName>
WHERE <Conditions>
ORDER BY <Col_Names OrderSeq>
OPTION <Options>