The UPDATE statement is used to change one or some of the values in a data row. As with DELETE, you include a WHERE clause to indicate that this row or rows are to be updated.
Without a WHERE clause, UPDATE performs the same update on every row in the table. Unless this is the result you want, always include a WHERE clause in an UPDATE statement.
You specify the values to be changed in a list after the SET keyword, separated with commas. The following example updates the name and price of an existing product:
mysql> UPDATE products -> SET name = 'Large product (new and improved)', -> price = 23.99 -> WHERE product_code ...