UPDATE Operations
The UPDATE query is used at National 5 to edit the value(s) stored in one field of a database table.
For example:
1 2 3 | |
This query will increase the price of every product, with a name that begins with the letter D, by 10%.
For Higher, candidates are required to use a single query to change the values stored in more than one field of a database query.
The general syntax of this UPDATE query is:
1 2 3 | |
Note
Each expression used in the SET clause can be a specific value or an expression (which can, if required, use arithmetic operators). The WHERE clause is optional.