Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Changing Foreign Key Entry
One Question :
Don't we have something like ON UPDATE CASCADE ( similar to ON DELETE
CASCADE) ???
"DA Morgan" <damorgan_at_exxesolutions.com> wrote in message
news:3E8CA783.DA5EAABF_at_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 Fri Apr 04 2003 - 03:41:19 CST