----------------------------------------------------------------
- PL/SQL: Trigger example (Example 4.5.2)                      -
- Chapter 4; Oracle Programming -- A Primer                    -
-            by R. Sunderraman                                 -
----------------------------------------------------------------

CREATE OR REPLACE TRIGGER update_price_of_parts
AFTER UPDATE OF price ON parts
FOR EACH ROW
BEGIN
 INSERT INTO parts_log 
 VALUES (:old.pno,USER,SYSDATE,:old.price,:new.price);
END;
/
show errors
