Re: FK - automatic value change when parent changes

From: Galen Boyer <>
Date: Sat, 27 Feb 2010 11:56:22 -0500
Message-ID: <>

eh <> writes:

> Hi,
> we have a Fk pointing to a parent table/column - and now sadly enough
> that primary key value will change.
> What would be a smart way to implement this change to these child
> tables ?
> Disabling FK's and a lot of update clauses or .... ??

Alter the FK constraint to deferred. Then, update the parent key with a follow-on update to the child key and then commit. Since the constraint is deferred, it won't bark at you during the operation.

Galen Boyer

--- news:// - complaints: ---
Received on Sat Feb 27 2010 - 10:56:22 CST

Original text of this message