UPDATE

Syntax: 

UPDATE [ OR conflict-algorithm ] [catalog-name.]table-name SET assignment[, assignment]* [ WHERE expr ]

assignment:
column-name = expr
	

The UPDATE statement is used to change the values of columns in the 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 allows an alternative constraint conflict resolution algorithm to be specified, which will be used for this single command. See the ON CONFLICT clause section for additional information.

Example 43.23. Using UPDATE to supply missing values from a different table

table 'tmp_client':
    format age INTEGER
    id  age otherdata
    1  None 'a'
    2  None 'b'
    3  None 'c'

table 'tmp_age':
    id age
    1  35
    2  76

sql:
     UPDATE tmp_client SET
     age = ( SELECT tmp_age.age FROM tmp_age  where tmp_client.id = tmp_age.id )

sql tmp_client_out:
    SELECT * FROM tmp_client
print tmp_client_out

Output:

id | age  | otherdata |
+--+------+-----------+--
 1 |   35 | a         |
 2 |   76 | b         |
 3 | None | c         |