Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用更新 sql 更新表,但我忘记了“位置”,一列所有数据为空。我该怎么做才能让数据恢复到更新前的操作?请帮我!!
如果将表类型定义为 InnoDB,则可以使用事务(参见下面的链接)。您需要设置 AUTOCOMMIT=0,然后您可以在查询或会话结束时发出 COMMIT 或 ROLLBACK 以提交或取消事务。
ROLLBACK -- will undo the changes that you have made