Skip to content
Advertisement

savepoint in sql

Can I rollback to a savepoint ( which was done before a commit ) in SQL ?

Advertisement

Answer

You can use the ROLLBACK TO SAVEPOINT statement only in the transaction.

In MySQL documentation (https://dev.mysql.com/doc/refman/8.0/en/savepoint.html) you find:

All savepoints of the current transaction are deleted if you execute a COMMIT, or a ROLLBACK that does not name a savepoint.

So the answer to your question is: no.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement