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_at_4ax.com>
Date: Mon, 27 Dec 1999 14:01:42 -0500
Message-ID: <1rdf6so4jdvnhb6pim40al122gapk2acmi_at_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 CorporationReceived on Mon Dec 27 1999 - 20:01:42 CET