Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to write trigger for ON_DELETE_CASCADE?
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
-- 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
![]() |
![]() |