Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site

Updating Tables

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:
    SET EXCHANGE_RATE = 0.8886
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');

Primary key columns can be updated provided the table is stored in a databank with TRANSACTION or LOG option.

Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
Mimer SQL Documentation TOC PREV NEXT INDEX