What is the result of the above code execution? BEGIN - ProProfs Discuss
Topics
Products
Follow Us:

What is the result of the above code execution? BEGIN TRANSACTIONINSERT INTO DemoTable VALUES(5,'XYZ','DEMO');BEGIN TRANSACTIONUPDATE DemoTable SET Col3 = 'Test'WHERE TestID = 5;COMMIT TRANSACTION;ROLLBACK;



A. The data is rolled back to the transaction starting on line1.
B. The inserted row does not exist in the table.
C. All of the above.
D. None of the above.
E. Only B.

This question is part of Microsoft SQL Server Quiz
Asked by Telliant, Last updated: May 21, 2020

+ Answer
Request

2 Answers

John Adney

John Adney

Answered Mar 02, 2017

Hi i have a doubt ,the data is commited when you rollback will the commited data be removed?
 

John Smith

John Smith

Answered Dec 19, 2016

All of the above.
 1

nithinpoovanna

Hi i have a doubt ,when the data is commited ,when you rollback will the data remain or it gets deleted

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.