SET Clause
Use the SET clause to identify the columns to be updated and assign values to each column.
The SET clause supports the following syntax formats:
- A single-column format, which pairs each column with a single expression
- A multiple-column format, which associates a list of multiple columns with the values returned by one or more expressions
The following
UPDATE statement uses the single-column format of the SET clause to
change the value of the customer.city column of any existing
row whose value in the customer.customer_num column is
103
.UPDATE customer SET city = 'Alviso' WHERE customer_num = 103;If no row has
103
as its customer_num column
value, this example has no effect on the customer table.