Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Changing Foreign Key Entry

Re: Changing Foreign Key Entry

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 03 Apr 2003 13:28:35 -0800
Message-ID: <3E8CA783.DA5EAABF@exxesolutions.com>


Nicolas Bronke wrote:

> In a database there are existing a foreign key. The fieldtype is Varchar2.
> Now one entry of the foereign key shall be changed, because of a misspelling
> in the reference table and therefore also in the detail tables.
>
> I thought I have to disable the foreign key, change the value and enable the
> foreign key again.
>
> Now someone told me that there is also another way via a trigger on the
> reference table. Is that true?
>
> Regards
> Nicolas

Add the correct value to the lookup table update the child table
delete the incorrect value.

This is not a proper use of a trigger or any other complicated way to perform a simple update.

Daniel Morgan Received on Thu Apr 03 2003 - 15:28:35 CST

Original text of this message

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