March 9, 2007 at 3:35 pm
Is it possible that another user or another connection changes my @@rowcount value before I can read it ?
March 9, 2007 at 9:36 pm
No.
But keep in mind that ANY statement (even print '' or set @MyVar = 4) made after the query will either reset it to 0 or to the new number of rows affected.
March 10, 2007 at 2:33 am
Thanks for your time Ninja's_RGR'us !
Wilco.
March 10, 2007 at 6:23 am
Happy to help. Come back anytime you have another question.
March 13, 2007 at 12:10 pm
Actually, a trigger that inserts into a table with an IDENTITY column will 'mask' the identity you are expecting.
To limit the value returned to the table within the scope of the DML you may want to investigate SCOPE_IDENTITY()
March 13, 2007 at 1:39 pm
That's a good point but what does the identity have to do with rowcount?
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply