-- Create table statement create table wangzstable (idintegernot null, NAMEVARCHAR (20) not null, AGEVARCHAR (20) not null, STATUSVARCHAR (10), createtimestamp, UPDATETIMETIMESTAMP, SENDTIMETIMESTAMP ); select * from wangzsTable; insert into WANGZSTABLE (id, name, age) values (1, 'hangzhous1 ', '26 '); update WANGZSTABLE set status = '2' where id = 1; -- update specific status = 4 drop trigger "WANGZS_UPDATE "; create trigger WANGZS_UPDATE after update of status on wangzstable referencing old as oldrow new as newrow for each row mode DB2SQLBEGIN atomic if (NEWROW. STATUS = '4') THEN update wangzsTable set UPDATETIME = current timestamp where id = NEWROW. id; end if; END; -- update updates specific idDROP TRIGGER "WANGZS_UPDATE "; create trigger WANGZS_UPDATE after update of status on wangzstable referencing old as oldrow new as newrow for each row mode DB2SQLBEGIN ATOMIC update wangzsTable set UPDATETIME = current timestamp where id = NEWROW. id; END; -- insertDROP TRIGGER "WANGZS_INSERT"; create trigger WANGZS_INSERT after insert on Fig new as newrow for each row mode DB2SQLBEGIN ATOMIC update WANGZSTABLE set CREATETIME = current timestamp where id = NEWROW. id; END;