How can I roll back my last delete command in MySQL?

后端 未结 10 2160
臣服心动
臣服心动 2020-12-25 09:32

I accidentally deleted some huge number of rows from a table...

How can I roll it back?

I executed the query using PuTTY.

I\'ll be grateful if any of

10条回答
  •  旧巷少年郎
    2020-12-25 10:35

    A "rollback" only works if you used transactions. That way you can group queries together and undo all queries if only one of them fails.

    But if you already committed the transaction (or used a regular DELETE-query), the only way of getting your data back is to recover it from a previously made backup.

提交回复
热议问题