Oracle Database - Cascade

> Database > Oracle Database

2 - How

2.1 - Update a record in the primary key

how can I update a record in the primary key field which behaves as a foreign key to other tables without altering (disabling) the primary/foreign constraint?

If you create the foreign keys “deferrable”, you can

SET constraints deferred;
UPDATE parent_table;
UPDATE child_table(s);
commit;

and the constraint will be verified at the commit instead of at the statement level, allowing you to “cascade” the update yourself.

Advertising

3 - Documentation / Reference

db/oracle/cascade.txt · Last modified: 2017/09/06 19:27 by gerardnico