SAVEPOINT in SQL — a practical guide to SQL SAVEPOINT with clear examples you can reuse in real projects.
SQL Tutorial Series (67/100). Prefer one article? Read the complete SQL tutorial.
Short description
Useful for complex procedures with optional sub-steps.
Savepoint
SAVEPOINT before_discount;
-- ...
ROLLBACK TO SAVEPOINT before_discount;