Piotr <m-l-o-d-ytlen.pl> wrote:
Two easy options:> Hello,
> I would like to use trigger to record change in every field (F1, F2, F3..)
> from table TAB1.
> CREATE TRIGGER TR1
> AFTER UPDATE OF F1, F2, F3, F4 ON TAB1
> NEW AS N
> OLD AS O
> FOR EACH ROW MODE DB2SQL
> BEGIN ATOMIC
> INSERT INTO TAB2 VALUES (F1 OR F2 ??)
> How can I find name of column which was actually changed ?
(1) use separate triggers, one for each column
(2) compare the new and old values - if the values are different, then
that's where the update happened.
IBM Germany / University of Jena