UPDATE | Table Name |
SET | column name = value,column name = value... |
WHERE | terms |
UWhen using the UPDATE statement, enter the Table Name of the record to be updated after UPDATE, and enter the item name = value to be updated after SET. When updating multiple items, use a comma-separated list of the item name = value to be updated.
The WHERE condition is used to specify which records are to be updated; an UPDATE statement updates all records that match the WHERE condition; if no WHERE condition is specified, all records are updated.
UPDATE | EMP |
SET | SAL = SAL * 1.5 |
WHERE | EMPNO = 7369 |
You can also update the record using the value calculated and obtained during the SQL execution. In the above example, the salary of a person with Employee Number 7369 in the EMP table is multiplied by 1.5.
This completes the [ UPDATE record UPDATE statement ].