DB2 触发器的问题
ORACLE中有个函数能返回执行数 DB2的触发器有没有相关的函数!
BEGIN ATOMIC
inum INTEGER;
SET inum = (update lis_itemcount set itemcount = itemcount + 1 WHERE testdate = new.testdate and itemcode = new.itemcode and machinecode = new.machinecode);
IF inum is null then
insert into lis_itemcount values(new.testdate,new.itemcode,new.machinecode,1);
END IF;--
END;
这个是我想的一个方法,但是执行不过去。还请各位老大指导!