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: Foreign Key in ORacle 7.3

Re: Foreign Key in ORacle 7.3

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/11/20
Message-ID: <650mrb$cfd$1@news02.btx.dtag.de>#1/1

Wai B Kam wrote:
>
> I create a foreign key with ON DELETE CASCADE option. When I delete the parent key, the child key
> does get deleted. But if I try to update the parent key, error comes up saying child key found.
> I thought Oracle will handle that also?? Please Help me. Thank You

Hi,

you could use an before update trigger to updatre the childs:

Update childtable set fk=:new.pk where fk=:old.pk;

-- 
Regards

Matthias Gresz    :-)
Received on Thu Nov 20 1997 - 00:00:00 CST

Original text of this message

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