One sql statement to subtract and update a field value

I would like to keep track of inventory and update it as the products are moved. Here is a sample

Inventory Table:
InventoryID
InventoryName
Quantity

Sample data


InventoryID    InventoryName  Quantity
1                  Printer             10
2                  Mouse             12
3                  Monitor             9

How do I write a single query that decreases the quantity of, say, mouse


UPDATE Inventory
   SET Quantity = Quantity - 1
 WHERE InventoryID = 2

:slight_smile:

thank-you!

didnt think it was possible to say Quantity = Quantity - 1

we learn everyday!