Posted By

wh0emPah on 04/02/10


Tagged


Versions (?)

mqiojfei


 / Published in: PL/SQL
 

  1. CREATE OR REPLACE TRIGGER P6_4_UPDATETOTAL
  2. AFTER UPDATE OR INSERT ON s_item FOR EACH ROW
  3. UPDATE s_ord
  4. SET total = (SELECT SUM(PRICE * QUANTITY)
  5. FROM S_ITEM
  6. WHERE ORD_ID = :NEW.ord_id)
  7. GROUP BY ORD_ID;
  8. WHERE ID = :NEW.ord_id;
  9. END P6_4_UPDATETOTAL;

Report this snippet  

You need to login to post a comment.