Re: PL/SQL: To determine which field was update

From: Pavel Luzanov <pal_at_kpbank.ru>
Date: 1997/08/07
Message-ID: <01bca2d0$036fff20$93c47cc1_at_pal.hq.kem>#1/1


Tomm Carr <tommcatt_at_geocities.com> çàïèñàíî â ñòàòüþ <33E89C86.51A_at_geocities.com>...
> Gillian D. Murugappan wrote:
> >
> > I have to write a trigger to update a second table when any field in
 the
> > first table was updated.
> >
> > I would not be updating the table but the enduser. How do I determine
> > which field in the first table was updated?
> >
> > Does Oracle have some reserved word that I can track the field updated
> > in a particular row?
>
> You may specify that the trigger fire only when certain columns are
> modified, but the only way to tell specifically which column is being
> changed is to compare :old.xxx with :new.xxx.
>

Another way is to use reserved word for triggers - UPDATING -

   IF UPDATING ('COLUMN_1') THEN ... END IF;    IF UPDATING ('COLUMN_2') THEN ... END IF;



Pavel Luzanov
Kuzbassprombank Received on Thu Aug 07 1997 - 00:00:00 CEST

Original text of this message