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: Cascaded Updates

Re: Cascaded Updates

From: Mohamad SALEH <msaleh_at_orsys.fr>
Date: Thu, 22 Apr 1999 18:46:35 +0200
Message-ID: <371F526B.26A55E7D@orsys.fr>


Stan a écrit :

> Does Oracle support Cascaded Updates? (i.e. if I change the primary key
> in a referencing table, will oracle go through and changes all
> references in the referencing table).
>
> I have tried the following:
> CREATE TABLE MAINTABLE(MAINCODE CHAR(5) NOT NULL, COD1 CHAR(5),PRIMARY
> KEY(MAINCODE),
> FOREIGN KEY(COD1) REFERENCES SUBDETAIL(COD1) ON UPDATE CASCADE);
>
> Thanks, Stan.

Besides what Thomas Kyte said, you have the issue in the wrong order. The "FOREIGN KEY" constraint
is created on the detail table not the main one. Received on Thu Apr 22 1999 - 11:46:35 CDT

Original text of this message

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