SQL Transaction Interview Questions
Transactions make several changes succeed or fail together. Interviewers ask about them to see whether you think about what happens if something fails halfway.
These questions run real BEGIN and COMMIT blocks on a private copy of the database.
Patterns to know
- Grouping changes so they all succeed or none do
- Moving stock or money between rows safely
- Partial rollback with SAVEPOINT and ROLLBACK TO