Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Get name of column in a trigger
The only way you can do it is comparing old and new values of columns, using :old and :new qualifiers in row-level triggers. But, maybe somebody knows better answer...
In article <961lrn$l3o$1_at_nnrp1.deja.com>,
michael_gressman_at_my-deja.com wrote:
> 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/
>
Sent via Deja.com
http://www.deja.com/
Received on Fri Feb 09 2001 - 17:03:59 CST