Updated: April 19, 2023

Change the value of columns


 UPDATE [ OR conflict-algorithm ] [database-name.] table-name 
  SET column-name = expr [, column-name = expr]* [WHERE expr] 


The UPDATE command changes the value of columns in selected rows of a table. Each assignment in an UPDATE statement specifies a column name to the left of the equals sign and an arbitrary expression to the right. The expressions may use the values of other columns. All expressions are evaluated before any assignments are made. A WHERE clause can be used to restrict which rows are updated.

The optional conflict-algorithm lets you specify an alternative constraint conflict-resolution algorithm to use during this one command; see ON CONFLICT for more information.