how to create a temp table from select statement in sql server code example
Example 1: tsql create temp table
CREATE TABLE #haro_products (
product_name VARCHAR(MAX),
list_price DEC(10,2)
);
Example 2: sql server: creating temp table by selecting records from other tables
SELECT *
INTO #
FROM
WHERE
ORDER BY
OPTION