Solved

Rollback last transaction in a table.

Posted on 2008-10-23
2
836 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

17 Experts available now in Live!

Get 1:1 Help Now