SQL · Transactions and integrity

savepoint

Marks a point inside a transaction so part of it can be rolled back.

Syntax
savepoint name / rollback to name

Example

Open in the lab

More in this group

explain isolation levels lock rows rollback transaction

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course