Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Cascading Updates
Greetings!
When I create a table in Oracle 8 using PL/SQL script, the following syntax
(sample fragment) is used:
CREATE TABLE TEST_TABLE
(
VALUE1 VARCHAR2(10) NOT NULL, VALUE2 VARCHAR2(50) NOT NULL, VALUE3 VARCHAR2(4) NOT NULL,PRIMARY KEY (VALUE1,VALUE3),
If I want to delete the record in the parent table (TEST_TABLE1), it'll propagate the deletions of related records in the child table (TEST_TABLE). However, if I try to change a value in the parent table, and there are child records with the foreign key value being changed, it gives me an error:
ORA-02292: integrity constraint (TEST_DATABASE.SYS_C002255) violated - child record found
Is there an easy way in Oracle to propagate updates in the parent table to all its children? The only way I see it possible is through triggers, and I'd like to avoid it.
I'll really appreciate any help on this issue.
Thanks,
Oleg Received on Tue May 16 2000 - 00:00:00 CDT