Hi friends,
I want to know that what is the temporary table in sqlerver? Can we make any temporary table it's own give the explanation also?
Temporary table in sqlserver
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 11, 2012, 6:12 AM EST
Please refer the below link
http://www.simple-talk.com/sql/t-sql-programming/temporary-tables-in-sql-server/
http://vishalnayan.wordpress.com/2011/04/14/what-are-temporary-tables-in-sql-server/
Thanks
Mukesh KumarRank #615 · 3.9K reputationPosted Jan 11, 2012, 7:17 AM EST
Check below link:
http://www.codeproject.com/KB/database/TempTable.aspx
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 11, 2012, 6:04 PM EST
SQL Server provides the concept of temporary table which can be created at runtime and can support the all kinds of operations that one normal table can do. But, the life of these table is depend on table scope. These tables are created inside
tempdbdatabase.Example:
Local Temporary Table
CREATE TABLE #TempTable(ID int,
Name varchar(50),
Address varchar(150))
insert into #TempTable values ( 1, 'Jignesh','India');
Select * from #TempTable;
Drop table #TempTable
Global Temporary Table
CREATE TABLE ##TempTable(
ID int,
Name varchar(50),
Address varchar(150))
This is because the scope of Local Temporary table is only bounded with the current connection of current user.
Global temporary tables are visible to all SQL Server connections. When you create one of these, all the users can see it.
hope this help.