You plan to execute the following code:
You need to identify how many rows will be in dbo.Table1 after you execute the code.
How many rows should you identify?
A.
0
B.
1
C.
2
D.
3
You plan to execute the following code:
You need to identify how many rows will be in dbo.Table1 after you execute the code.
How many rows should you identify?
A.
0
B.
1
C.
2
D.
3
(A) is correct
Committing inner transactions is ignored by the SQL Server Database Engine. The transaction is either committed or rolled back based on the action taken at the end of the outermost transaction.
https://technet.microsoft.com/en-us/library/ms189336(v=sql.105).aspx
Blimey didn’t know you could do that in the latest versions of SQL server, I am still using named transactions and deciding whether to use BEGIN or SAVE transaction to implement nested transactions!