Deviopath › PostgreSQL

Restock Sold-Out Products

Easy · Update

UPDATE table SET column = value WHERE condition; changes existing rows. Without WHERE, every row changes, so always check your condition.

Set stock to 20 for every product that is sold out (stock is 0). Leave the other products alone. The checker then lists all products.

Next: Remove Cancelled Orders