July 13, 2009 at 1:56 pm
good question. Just-in-time I remembered, table variables do not participate in transactions.
July 29, 2009 at 5:25 am
Very good question
If you change the line:
DECLARE #test TABLE (id int, pname varchar(100))
to
create table #test (id int, pname varchar(100))
it will return zero rows - which was what I thought it would do -
July 29, 2009 at 8:18 am
I think this is great behavior. Allows you to easily log things that might happen in a transaction that needs to roll back. If you used a permanent table, your logging would be lost.
August 20, 2009 at 5:12 pm
Hi Steve,
that (logging) I was doing a lot in the past project - and I was missing the point too :crazy:
Every time I tell this fact to customers (e.g. the ones, who was calling me with nearly empty log tables) I know that but was failing.
The best question for a long time. Clear focus, seems easy, but have to read VERY vcarefully.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy