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

Home -> Community -> Usenet -> c.d.o.server -> Re: Cascading deletes and ORACLE

Re: Cascading deletes and ORACLE

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 27 Dec 1999 14:01:42 -0500
Message-ID: <1rdf6so4jdvnhb6pim40al122gapk2acmi@4ax.com>


A copy of this was sent to mscasey_at_fnord.io.com (Casey Claiborne) (if that email address didn't require changing) On 27 Dec 1999 18:28:52 GMT, you wrote:

>Hello -
>
>Where can one find information on how to set up Cascading Deletes in
>ORACLE? In other words, if I delete a parent row, all of the children
>associated with the parent row are deleted as well.
>
>I would greatly appreaciate any information on the subject.
>
>TIA
>
>Casey :)
>
>

sql ref manual gives the syntax:

create table child ( ..., x int references parent(a) on delete cascade );

and in 8i and up

create table child ( ..., x int references parent(a) on delete set null );

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Dec 27 1999 - 13:01:42 CST

Original text of this message

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