Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> MASTER-DETAIL UPDATE
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