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: Cascade DELETE

Re: Cascade DELETE

From: Grue <grue_at_hotmail.com>
Date: 1998/01/29
Message-ID: <34d0c242.12232521@128.158.254.10>#1/1

Uhhh...I think you answered your own question. When you create the foreign key between the tables, specify ON CASCADE DELETE. Then, when you delete a record from the parent table, the child records will also be deleted.

On 29 Jan 98 17:42:55 GMT, "miguel" <jmiguel_at_cet.pt> wrote:

>Hi,
>
>Tables EMP(DEPTNO,DNAME) and DEPT(DEPTNO,ENAME) with the column EMP.DEPTNO
>referencing DEPT.DEPTNO.
>
>Is it possible, in one SQL statment, to delete rows from the child table
>when i delete the referenced row in the parent table? I´m searching an
>alternative to triggers.Which is the best choice?
>
>Thanks
>Miguel
Received on Thu Jan 29 1998 - 00:00:00 CST

Original text of this message

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