简单的处理: 新增记录时,比较varchar字段knh和kh的内容,把内容长的放kh里(也就是更新原来的内容)。
------解决方案--------------------------------------------------------
网上例子很多,INFORMIX书上也有
create table temp_trig
(a serial,
b integer,
c integer);
CREATE PROCEDURE output_by_input(v_input integer) RETURNING integer;
RETURN v_input;
END PROCEDURE;
drop trigger tr_tmp_trig_i ;
create trigger tr_tmp_trig_i insert on temp_trig
referencing new as new
for each row
(
execute procedure output_by_input(new.a) into c
);
insert into temp_trig (b) values (2);