Reputation: 11
I know that you do the BEGIN; command, then all commands after that can be rolled back, as long as you haven't executed COMMIT; yet. My question is, is there a command to roll back just one command and not ALL commands after the BEGIN? I'm using Postgres by the way.
Upvotes: 0
Views: 1088
Reputation: 562310
Read https://www.postgresql.org/docs/14/tutorial-transactions.html about SAVEPOINT
and ROLLBACK TO SAVEPOINT
.
Upvotes: 2