2.9. UPDATE

The update query is used to change the values of certain fields in existing records.

2.9.1. Syntax

update tablename set field1 = expression, field2 = expression 
        where condition

2.9.2. Examples

update stock_item set quantity = (quantity - 1) where id = 4;