Solved

Rollback last transaction in a table.

Posted on 2008-10-23
2
811 Views
Last Modified: 2012-05-05
How to rollback the last transaction in any table using SQL?
0
Comment
Question by:rpkhare
2 Comments
 
LVL 26

Accepted Solution

by:
ushastry earned 125 total points
ID: 22794383

If the AUTOCOMMIT mode is enabled then you can't.. The point of COMMIT is that it won't be undone.
If you haven't committed it, use ROLLBACK...

But if required.. the work around is..

SET AUTOCOMMIT=0;
-- your transaction...
then you can ROLLBACK or COMMIT the transaction..

SET AUTOCOMMIT=1;

0
 
LVL 8

Author Closing Comment

by:rpkhare
ID: 31509545
Thanks.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now