mysql撤销上一步sql语句
时间: 2023-08-28 22:23:05 浏览: 235
在MySQL中,你可以使用"rollback"命令来撤销上一步的SQL语句。如果你想撤销多个语句,可以使用"rollback to savepoint"命令,并指定一个保存点来回滚到该保存点之前的状态。请注意,回滚只在事务开启时有效,如果自动提交已打开,你需要在执行SQL语句前先使用"begin"或"start transaction"命令来开启事务。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [MySQL取消正在执行的SQL语句](https://blog.csdn.net/lovelovelovelovelo/article/details/102837271)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [MySQL事务](https://blog.csdn.net/weixin_57551677/article/details/126763820)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文