The Update Statement
The general form of the update statement is:
update
table
set
column-expression list
[where
predicate];
To update the salesperson for all orders sold by Don Marino to Liza Collins, we would issue the following update statement:
update orderhea
set salesperson_id = 'LC'
where salesperson_id = 'DM';
Column-Expression List
The column expression list is made up of column expressions separated by commas. A column expression is of the form column = expression. You can use mathematical operators in the expression.
Where Predicate
If vendor 7, Software Publishing, would increase all prices by 10 percent, we could update our inventory in the following way:
update invt
set unit_price = unit_price * 1.1
where vendor_id = 7;
If no where clause is specified, the update is done on all rows. To increase all prices by 10 percent, we would use the following statement:
update invt
set unit_price = unit_price * 1.1;