PrepZone Logo
PrepZone
Back to Database

Database · Medium

What are savepoints in SQL transactions and when do you use them?

DatabaseTransactionsStaff

Answer preview

A savepoint is a named marker inside a transaction that you can roll back to without aborting the whole transaction. It gives you partial rollback — and it is the mechanism behind what most frameworks call "nested transactions".…