| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Cascaded Updates
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
![]() |
![]() |