Temporary Table

The temporary tables are useful for storing the immediate result sets that are accessed multiple times.

SQL Server provided two ways to create temporary tables via SELECT INTO and CREATE TABLE statements.

select * into #temp from employee

if you open another connection and try the query above query, you will get the following error:

Invalid object name '#temp'.

Global Temporary Table:

you may want to create a temporary table that is accessible across connections.

INSERT INTO ##empl
SELECT
 FROM 
    employee
WHERE

CREATE TABLE ##empl(
    emp_name VARCHAR(MAX),
    sal DEC(10,2)
);