如何撤消刚刚执行的mysql语句? [英] How can I undo a mysql statement that I just executed?
本文介绍了如何撤消刚刚执行的mysql语句?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何撤消最近执行的mysql查询?
How can I undo the most recently executed mysql query?
推荐答案
如果将表类型定义为InnoDB,则可以使用事务.您将需要设置AUTOCOMMIT=0
,然后可以在查询或会话末尾发出COMMIT
或ROLLBACK
来提交或取消交易.
If you define table type as InnoDB, you can use transactions. You will need set AUTOCOMMIT=0
, and after you can issue COMMIT
or ROLLBACK
at the end of query or session to submit or cancel a transaction.
ROLLBACK -- will undo the changes that you have made
这篇关于如何撤消刚刚执行的mysql语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文