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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Trigger on specific column

Re: Trigger on specific column

From: Markus Roeder <markus.roeder_at_gwi-ag.com>
Date: Wed, 22 Nov 2000 08:56:09 +0100
Message-ID: <3a1b7c1a@news.gwi-ag.com>

You can write a column list instead of the column if you know the columns to be updated. For example:
 . . . BEFORE UPDATE OF ename1, ename2, edate ON emp . . .

I think it's better you use one trigger. If you write multiple triggers - each for a single column - you don't know which of them fires first.

Regards

Markus

<bhavinsh_at_my-deja.com> schrieb im Newsbeitrag news:8vee1d$sr9$1_at_nnrp1.deja.com...
> How do you make the column variable?
> If I have 10 columns, do I need 10 update triggers (1 for each column)?
> Or can I do it in one trigger knowing which column the update is
> happening on?
>
> Thanks again.
>
> In article <3a1a1dd8_at_news.gwi-ag.com>,
> "Markus Roeder" <markus.roeder_at_gwi-ag.com> wrote:
> > If a triggering statement specifies UPDATE, an optional list of
 columns can
> > be included in the triggering statement. If you include a column list,
 the
> > trigger is fired on an UPDATE statement only when one of the specified
> > columns is updated. If you omit a column list, the trigger is fired
 when any
> > column of the associated table is updated. A column list cannot be
 specified
> > for INSERT or DELETE triggering statements.
> >
> > The previous example of the trigger might have included a column list
 in the
> > triggering statement, as in
> >
> > . . . BEFORE UPDATE OF ename ON emp . . .
> >
> > Regards,
> >
> > Markus
> >
> > <bshah_at_sportsmail.com> schrieb im Newsbeitrag
> > news:8vc3u1$es$1_at_nnrp1.deja.com...
> > > Hi,
> > >
> > > How do you create a trigger for a specific column (or set of columns)?
> > > For example, I would like to take one action for an update to col x,
> > > and another action for an update to col y.
> > >
> > > Thanks in advance.
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Nov 22 2000 - 01:56:09 CST

Original text of this message

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