Adds or changes values in existing columns in existing rows of a table.

Syntax

UPDATE <table name>
 SET <column name> = <expression> [, <column name> = <expression>...]
 WHERE <search condition>

Description

Use UPDATE to update (change) values within existing columns in existing rows of a table. The column specified by <column name> is updated with the value of <expression> in all rows that match the <search criteria> of the WHERE clause. If the WHERE clause is omitted, the column is updated in all rows in the table. Multiple columns may be updated in a single UPDATE command. A given column of a table may only appear once to the left of an equal sign (=) in the SET clause.