how to roll back a transaction ?
write a query to roll back transaction (say delete a record) in sql server 2012 ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Midhun TpPosted Aug 25, 2016, 9:28 PM
BEGIN TRAN
Delete from tablename where id='1';
-- if delete is what you want then
COMMIT TRAN
-- if NOT then
ROLLBACK
Please check below links for more details -
http://www.c-sharpcorner.com/UploadFile/63f5c2/commit-and-rollback-comands-in-sql-server/
http://www.codeproject.com/Questions/530141/HowplustoplusRollplusBackplusInsert-cUpdateplusan
Kavi NithyasriPosted Aug 30, 2016, 2:16 AM
Vinay SinghPosted Aug 26, 2016, 5:52 AM
Bikesh SrivastavaPosted Aug 26, 2016, 5:15 AM
ketan borsdiyaPosted Aug 26, 2016, 12:34 AM