Stock Deduction Without Negative Balance
Several checkout workers sell item id = 1 from inventory at the same time, deducting 1 unit from stock. Write one safe statement: the deduction should happen only when stock is available, and stock must never drop below 0.
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj się