Solved

Rollback last transaction in a table.

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

12 Experts available now in Live!

Get 1:1 Help Now