Not applicable to your example, but you will probably find this useful:
UPDATE table SET value = <value> WHERE field = <specific value>
This way you can update one field in a table based on another field in the same table. All relevant lines will be updated. To give an example that I used at work this morning
UPDATE porderitems SET currency = -2 WHERE ord = 40396
This request updates the porderitems table (purchase order lines), setting the currency to -2 for all lines associated with purchase order 40396. The request does not know and does not care about how many lines are in this purchase order; they will all be updated.
source share