BEGIN TRAN INSERT INTO table (‘Food’) BEGIN TRAN INSERT INTO table (‘Beverages’) COMMIT TRAN ROLLBACK TRAN In table will be folowing items:

BEGIN TRAN
INSERT INTO table (‘Food’)
BEGIN TRAN
INSERT INTO table (‘Beverages’)
COMMIT TRAN
ROLLBACK TRAN

In table will be folowing items:

BEGIN TRAN
INSERT INTO table (‘Food’)
BEGIN TRAN
INSERT INTO table (‘Beverages’)
COMMIT TRAN
ROLLBACK TRAN

In table will be folowing items:

A.
None

B.
Food

C.
Beverages

D.
Food And Beverages



Leave a Reply 7

Your email address will not be published. Required fields are marked *


magy

magy

This are nested transactions. The answer should be A. None

CREATE TABLE #AA(Name nvarchar(40))
BEGIN TRAN
INSERT INTO #AA VALUES (‘Food’)
BEGIN TRAN
INSERT INTO #AA VALUES (‘Beverages’)
COMMIT TRAN
ROLLBACK TRAN
select * from #AA

bhavdip

bhavdip

i am totally agreed with magy

Aasdasd

Aasdasd

please update answer to A

networkmanagers

networkmanagers

waiting some comments about this for change .

Ani

Ani

Answer: A (None)
Explanation: With a nested transaction, a commit does not write any changes to disk, except for the top level transaction. A rollback, however works regardless of the level of the transaction, so yes, it will roll the inner transaction back.