Updating a table, however I would like to save the old info in another tabl

Dear all; I have a table called table_one,
Which contains the following info
carid            place
Benz            New York
BMW            LondonThis information is usually going to be updated in the near future, however, I would like a situation where before the information is updated, the old information will be saved in another table called table_two first. so for example, from table_one, lets say New York is being updated to Toronto, I would like
Carid place
Benz New York
saved first in table_two before the update is done. How do I go about doing that. Thanks you

it should have been
CREATE OR REPLACE TRIGGER partinstance_before_update
   BEFORE UPDATE
   ON qc_shelf_life_part_instances
   FOR EACH ROW
BEGIN
   INSERT INTO auditqcshelflifepartinstances
               (a_part_number,
                a_instance_number,
                a_mfg_part_number,
                a_description,
                a_revision,
                a_acount_number,
                a_part_quantity,
                a_measurement_unit,
                a_mfg_date,
                a_expiry,
                a_location,
                a_last_updated,
                a_modified_by
        VALUES (:old.part_number,
                :old.instance_number,
                :old.mfg_part_number,
                :old.description,
                :old.revision,
                :old.account_number,
                :old.part_quantity,
                :old.measurement_unit,
                :old.mfg_date,
                :old.expiry,
                :old.LOCATION,
                :old.last_updated,
                :old.modified_by
END;
/

Similar Messages

Maybe you are looking for