SQL Practice Logo

SQLPractice Online

Level 9 - DistinguishedDebugging Questionsm3 concurrency isolation deadlocks

Debug Opposite Lock Ordering

Two services update account rows in opposite order and deadlock. Provide a deterministic SQL locking pattern for transfers between account A and B.

Schema Context

accounts(account_id, balance)