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

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger help

Re: Trigger help

From: Roland Svensson <roland.svensson_at_mbox200.swipnet.se>
Date: 1997/10/19
Message-ID: <3449E12C.4B7B@mbox200.swipnet.se>#1/1

I would say you should redesign your tables. A column that is referenced by foreign keys should not be updated. Try adding a surrogate key (sequence number) on table A and use that for your foreign key. You will also get far better performance on your update statement.

Regards, Roland

mouyang_at_yahoo.com wrote:
>
> Hi everyone,
> I define 2 tables, A is the parent and B is child, and define
> a delete casading foreign key on table B. I want to implement
> updating in synchronism.
>
> I tried to update the foreign key field on A, of course it
> failed, so I define a before update trigger on that field to
> update the corresponding field of B. When updating on A it will
> cause error ORA-04091 and fail.
>
> How should I deal with that? Any help appreciated!
>
> Ming
>
  Received on Sun Oct 19 1997 - 00:00:00 CDT

Original text of this message

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