Saturday, February 16, 2013

Temp Tables Vs Table Variables

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


Isn’t this very simple and easy to understand?


  1. Temporary Tables vs. Table Variables and Their Effect on SQL Server Performance ::

  2. Mostly correct but does have some inaccuracies or omissions.

    Table 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.