Possible Duplicate:
What's the difference between a temp table and table variable in SQL Server?
What is the difference between table variable and temp table, actually I have two question on it.
- how to decide when to use what?
- which one is better in performance and WHY ?
The first difference is that transaction logs are not recorded for the table variables. Hence, they are out of scope of the transaction mechanism, as is clearly visible from this example:
Read more : http://www.sql-server-performance.com/articles/per/temp_tables_vs_variables_p1.aspx