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: please help

Re: please help

From: Dr. Jan Dieckmann <JDieckmann_at_psi.de>
Date: Tue, 15 Dec 1998 17:22:29 +0100
Message-ID: <36768CC5.AE02A2F0@psi.de>


Hi Steven,

you first have to drop the foreign key. You can create a foreign key with the on delete cascade option with the statement

ALTER TABLE MyChildTable ADD ( CONSTRAINT MyChildTable_FK FOREIGN KEY( Column1, ..., columnN) REFERENCES MyParentTable( Column1, ..., ColumnN) ON DELETE CASCADE ) An easy way to define foreign keys is using a tool like Hora 3. See http://www.keeptool.com for a 30 days free trial version of Hora 3

regards Jan Dieckmann

Steven wrote:

> hi,
>
> l have two exiting Parent and Child tables.
>
> May l know what's the actual command for me to use at SQL
> worksheet,
> in order to make them "on cascade delete" ?
>
> Purpose: when l deleted the parent table's record, the child
> table's record
> will be deleted as well.
>
> --
> With regards
> Steven
>
> Steven Koh, Internet Software Engineer,
> Mediaworks, Pacific Internet Pte. Ltd.,
Received on Tue Dec 15 1998 - 10:22:29 CST

Original text of this message

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