INTO TEMP TABLE SQL code example
Example 1: create temp table in sql
-- CREATE TEMP TABLE
Create Table #MyTempTable (
EmployeeID int
);
Example 2: select into temp table
SELECT t.col1, t.col2...
INTO #temp
FROM table1 AS t
Example 3: select into temp table
SELECT *
INTO #temp
FROM (
SELECT col1, col2
FROM table1
) AS x