?
Solved

Rollback last transaction in a table.

Posted on 2008-10-23
2
Medium Priority
?
864 Views
Last Modified: 2012-05-05
How to rollback the last transaction in any table using SQL?
0
Comment
Question by:rpkhare
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
Umesh earned 375 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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