SQL Sever Rollback Transaction

Posted by Murugavelmsc under Interview Questions on 4/2/2013 | Points: 10 | Views : 945 | Status : [Member] | Replies : 2
To rollback a portion of a transaction, We have to define ___.

A) Savepoints
B) Checkpoints
C) Transactions
D) None of the above

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Satyapriyanayak on: 4/2/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Savepoints

http://msdn.microsoft.com/en-us/library/ms178157%28v=sql.105%29.aspx

If this post helps you mark it as answer
Thanks

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 4/2/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
try this

BEGIN TRAN t1
UPDATE table1 SET username ='Asp' WHERE id = 100
IF @@error <> 0
ROLLBACK TRAN t1
COMMIT TRAN t1

Mark as Answer if its helpful to you

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response