I have posted couple of blog post on the above topic which are very popular.
Those blog posts were,
Temp Tables Vs Table Variables Vs CTE
What's the difference between a temp table and table variable in SQL Server-
Today I came across with nice picture which explains every thing from http://sqlserverplanet.com
Isn’t this very simple and easy to understand?
Temporary Tables vs. Table Variables and Their Effect on SQL Server Performance ::
ReplyDeletehttp://www.codeproject.com/Articles/18972/Temporary-Tables-vs-Table-Variables-and-Their-Effe
Mostly correct but does have some inaccuracies or omissions.
ReplyDeleteTable variables DO write to the tempdb log file. Non clustered indexes can be created via unique or primary key constraints. Also to be clear the issue with parallelism only applies to data modification queries not SELECT queries.
See http://dba.stackexchange.com/q/16385/3690