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 -> MASTER-DETAIL UPDATE

MASTER-DETAIL UPDATE

From: A. Elliot Gibbons <agibbons_at_erols.com>
Date: 1998/03/05
Message-ID: <34FF5B9C.4B70@erols.com>#1/1

Problem:

Is it possible to carry out an update which 'cascades' from one table to another as per the 'on delete cascade' used when defining foreign keys?

Table Structure:

TABLE_1			(MASTER)
ID_1	PRIMARY KEY

TABLE_2			(DETAIL)
ID_1	PRIMARY KEY
ID_2	PRIMARY KEY

FOREIGN KEY ON TABLE_2.ID_1 REFERENCES TABLE_1.ID_1 For instance, if ID_1 has a value of '999' in both TABLE_1 and TABLE_2 can it be modified in TABLE_1 and automatically updated in TABLE_2 without receiving the following error:

'integrity constraint (username.foreign_key_name) violated - child record exists'

Any advice would be very much appreciated.

ELLIOT
agibbons_at_erols.com Received on Thu Mar 05 1998 - 00:00:00 CST

Original text of this message

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