Build a safe retry around deadlocks
SQL
Hard
3 views
Problem Description
Write a transaction script outline that retries after rollback (concept). Provide a simple loop-like pseudo SQL.
Constraints
Pseudocode acceptable
Official Solution
BEGIN; UPDATE Inventory SET qty = qty - 1 WHERE product_id=10 AND qty > 0; COMMIT;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!