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