here's an example for oracle...

--**Delete the cmpny_address
DROP TRIGGER tr_delCmpnyAddr
/
CREATE TRIGGER tr_delCmpnyAddr
AFTER DELETE ON mfc_cmpny
FOR EACH ROW
BEGIN
  DELETE
  FROM cmpny_addresses
  WHERE cmpny_id = :old.cmpny_id;
END;
/


On Wed, 24 Jul 2002, Duane Boudreau wrote:

> This is my first attempt at a trigger. I have the following code, but it
> doesn't seem to be deleting the records from the respondant or question
> table. Any ideas why?
>
>
> CREATE TRIGGER trg_DeleteCoupon ON coupon FOR DELETE  AS
>
>       DELETE
>       FROM respondant
>       WHERE coupon_id = (SELECT coupon_id FROM deleted)
>
>       DELETE
>       FROM question
>       WHERE coupon_id = (SELECT coupon_id FROM deleted)
>
>
> Thx,
> Duane
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to