What is the difference between different types of temporary table's in Sql Server 2008?
1.) #table
2.) ##table
3.) CTE
4.) @table variable
What is the difference between different types of temporary table's in Sql Server 2008?
1.) #table
2.) ##table
3.) CTE
4.) @table variable
here are some good article on TempTable VS Table Variable
What is the difference between TEMPORARY TABLE and TABLE VARIABLE in SQL 2008?
http://www.codeproject.com/Articles/415184/Table-Variable-V-S-Temporary-Table
as a conclusion what i found :
Table variables (DECLARE @t TABLE) are visible only to the connection that creates it, and are deleted when the batch or stored procedure ends.
Local temporary tables (CREATE TABLE #t) are visible only to the connection that creates it, and are deleted when the connection is closed.
Global temporary tables (CREATE TABLE ##t) are visible to everyone, and are deleted when all connections that have referenced them have closed.
Tempdb permanent tables (USE tempdb CREATE TABLE t) are visible to everyone, and are deleted when the server is restarted.
but at last i would also recommend that You should improve your internet searching.