Light
Dark
System
v4latest
v5dev
v4latest
v3
v2
v1

Rollback to savepoint

rollback to savepoint – rollback to a savepoint within the current transaction

rollback to savepoint savepoint-name ;

Rollback all commands that were executed after the savepoint was established. The savepoint remains valid and can be rolled back to again later, if needed.

rollback to savepoint implicitly destroys all savepoints that were established after the named savepoint.

Copy
start transaction;
# ...
declare savepoint f1;
# ...
rollback to savepoint f1;
# ...
rollback;
Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.