Problem Statement
What does a SAVEPOINT allow you to do inside a transaction?
Explanation
Savepoints let you protect a block of work inside a larger unit. If the block fails, you roll back to the savepoint and continue with other steps.
They are useful for best-effort operations like optional inserts or per-row validations during batch processing.
Code Solution
SolutionRead Only
BEGIN; SAVEPOINT s1; -- try some write ROLLBACK TO SAVEPOINT s1; COMMIT;
Practice Sets
This question appears in the following practice sets:
