Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to write trigger for ON_DELETE_CASCADE?

Re: How to write trigger for ON_DELETE_CASCADE?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 16 Jun 2005 07:00:18 -0700
Message-ID: <1118930428.48518@yasure>


ajay.sonawane_at_gmail.com wrote:
> Hello Experts
> I am new in Sql triggers and i would like some help
> I have a Table called ITEM and another callded SOURCE
> [ITEM]
> ItemNo,ItemName,SourceNo
>
> [Source]
> SourceNo,Source
>
> i want to create a Trigger so when i delete a record from [SOURCE] all
> the records in [ITEM] where item.SourceNo = [SourceNo that I deleted
> from SOURCE] will be deleted.
>
> How can i do that?
>
> Regards,
> Ajay Sonawane
> (Webtech Developers Pvt. Ltd. Pune )

Others have helped you with the trigger. Please allow me to help you with your table names.

SQL> SELECT keyword

   2 FROM v$reserved_words
   3 WHERE keyword IN ('ITEM','SOURCE');

KEYWORD



SOURCE I would suggest you change it as soon as possible.
-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Thu Jun 16 2005 - 09:00:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US