Temp table is a Table which holds the information. There are two types of temp table
1) Local temp table
2)Global temp table
example of local temp table
CREATE TABLE #temp
(
ID INT,
Name VARCHAR(30)
)
INSERT INTO #temp (ID,Name) VALUES(1,'AZEEM')
INSERT INTO #temp (ID,Name) VALUES(2,'AMIR')
SELECT * FROM #temp
Local temp table are available for current context where as you can access the global temp table from any context.
In the Same way you can Create the Global Temp Table
CREATE TABLE ##temp
(
ID INT,
Name VARCHAR(30)
)
INSERT INTO ##temp (ID,Name) VALUES(1,'AZEEM')
INSERT INTO ##temp (ID,Name) VALUES(2,'AMIR')
SELECT * FROM ##temp
they are stored in System Database/tempdb/Temporary Tables