SQL Practice Logo

SQLPractice Online

Level 6 - ExpertDebugging Questionsm3 consistency integrity

Debugging: Lost Update Pattern

Fix this unsafe inventory update sequence: SELECT on_hand FROM inventory WHERE sku_id = 10; -- app checks value UPDATE inventory SET on_hand = on_hand - 3 WHERE sku_id = 10;