Data in existing table rows can be changed with the UPDATE statement. This statement has the general form:UPDATE table SET column = value [WHERE search-condition];
The search condition specifies which rows in the table are to be updated. If no search condition is specified, all rows will be updated.
Update the exchange rate for US dollars to 0.8886:UPDATE CURRENCIES SET EXCHANGE_RATE = 0.8886 WHERE CODE = 'USD';
Discount all Sony prices by 10 percent:UPDATE items SET price = price * 0.90 WHERE producer_id = (SELECT producer_id FROM producers WHERE producer = 'Sony');
When a subselect is used in the search condition, the table being updated may not be used in the subselect.
Primary key columns can be updated provided the table is stored in a databank with the TRANS or LOG option.
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40