Sorry, forgot the explanation. The reason that you dont discover any action from the trigger, might depend on the fact that the rows that match the trigger condition have not yet been commited. I.e. if you construct a trigger as:
CREATE TRIGGER TEST
AFTER INSERT ON XX
REFERENCING NEW AS NEWROW
FOR EACH ROW MODE DB2SQL
UPDATE XX SET T = CURRENT TIMESTAMP
WHERE X = NEWROW.X
and then insert into an empty table
insert into xx (x) values 1
At the time of update the newrow is not yet commited, hence there are no rows in the tables that match X = NEWROW.X
Normally one uses BEFORE triggers for this type of thing. Another thing where one uses BEFORE triggers is for CONSTRAINT things (which are not possible to express as table constraints. Example:
CREATE TRIGGER CHK_WHATEVER
NO CASCADE BEFORE UPDATE ON XX
REFERENCING OLD AS OLDROW NEW AS NEWROW
FOR EACH ROW MODE DB2SQL
WHEN (
oldrow.status = 3 and newrow.status NOT IN (4, 5)
) SIGNAL SQLSTATE '75000' ('Message goes here')@
HTH
/Lennart