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: Get name of column in a trigger

Re: Get name of column in a trigger

From: John Alexander <jalexander_at_summitsoftwaredesign.com>
Date: Sat, 10 Feb 2001 22:18:53 GMT
Message-ID: <h7jh6.97315$Tl3.19276808@typhoon.tampabay.rr.com>

Within the trigger, you can compare the old and new values:

IF :OLD.column_name = :NEW.column_name

John Alexander
www.SummitSoftwareDesign.com
St. Petersburg, FL

<michael_gressman_at_my-deja.com> wrote in message news:961lrn$l3o$1_at_nnrp1.deja.com...
> Within a trigger, is it possible to get the name of the column where
> data was changed? For example, if a table has columns A, B, C, and D,
> I want to be able to write a trigger that can determine which column A,
> B, C, or D the user changed data in and perform some action specific to
> the column in which the data was changed. I know I can do a row level
> trigger and select which columns will fire the trigger, but my table is
> actually quite a bit larger than 4 columns and I would prefer not to
> have individual update triggers for each column in the table. I am
> also under the assumption that there is a limit to the number of
> triggers that can be placed on one table, so, with a rather large
> table, I won't be able to have a separate trigger for each column.
>
> Thanks,
> Mike
>
>
> Sent via Deja.com
> http://www.deja.com/
>
Received on Sat Feb 10 2001 - 16:18:53 CST

Original text of this message

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