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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 12 Apr 1999 15:50:29 GMT
Message-ID: <37131575.14893145@192.86.155.100>


A copy of this was sent to Stan <delphiDev_at_yahoo.com> (if that email address didn't require changing) On Mon, 12 Apr 1999 11:01:18 -0400, you wrote:

>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.

No, that syntax is not supported. You can accomplish this with triggers in 7.x and 8.x. See

http://govt.us.oracle.com/govt/owassi/docs/utility/update_cascade.html

for how to implement this.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Apr 12 1999 - 10:50:29 CDT

Original text of this message

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