Can anyone explain the following?
I don't understand why the @@trancount is 2.
The insert statement is actually made up of two transactions, a selection that is subsequently placed into another transaction that performs the INSERT part.
insert into trancount (dt, trn)
You can see that the above code block is responsible for two transactions by wrapping the section in an explicit transaction.
@@trancount is typically used with explicit transaction not implicit.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?