xxxxxxxxxx
-- Create a temporary table
CREATE TEMPORARY TABLE temp_table (
id INT,
name VARCHAR(100)
);
-- Insert data into the temporary table
INSERT INTO temp_table (id, name) VALUES (1, 'John Doe');
INSERT INTO temp_table (id, name) VALUES (2, 'Jane Smith');
xxxxxxxxxx
--This will create a temp table on the fly
SELECT last_name, first_name, hire_date, job_title
INTO #tmp_employees
FROM dbo.employee
WHERE hire_date > '1/1/2010'