--Create TABLE wangzstable (Idintegernot null, Namevarchar () not NULL, Agevarchar () is not NULL, Statusvarchar (10 ), Createtimetimestamp, Updatetimetimestamp, Sendtimetimestamp); select * from Wangzstable;insert to Wangzstable (id,n Ame,age) VALUES (1, ' wangzs1 ', ' n '); update wangzstable set status= ' 2 ' where id=1;--update updates a specific state Status=4drop TRIGGER " Wangzs_update "; CREATE TRIGGER Wangzs_update after UPDATE of the 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 Update specific Iddrop TRIGGER "Wangzs_update"; CREATE TRIGGER Wangzs_update after UPDATE of the 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 WangzsTABLE referencing NEW as NEWROW for each ROW MODE db2sqlbegin ATOMIC update wangzstable set createtime=current times tamp where id=newrow.id; END;