Gianluca Sartori (2/25/2011)
Sean Lange (2/25/2011)
...there is not a table to log against. This is no different than any other variable type.Not true: operations on table variables are logged, but don't participate in transcations.
Jason-299789 (2/25/2011)
Also consider that Table variables actually end up as unindexed tables in the tempdb anyway...Not true: add a primary key or unique costraint and you can add indexes to a table variable.
Here's a great post by Gail Shaw on both myths: http://sqlinthewild.co.za/index.php/2010/10/12/a-trio-of-table-variables/
I stand corrected on that point, I was pulled up by a senior on a code review several years ago when he caught me using table variables, and he insisted I revisit all my code and change the table variables to Temp tables.
ps : thanks for the link, its a good article.
_________________________________________________________________________
SSC Guide to Posting and Best Practices