逻辑:如果tc_ggm_file插入数据,则tc_gge_file,复制最大版本号的数据到新版本上,版本号新旧 都是通过tc_ggm_file 获取
create or replace trigger fr_cs
before INSERT
on tc_ggm_file
for each row
begin
INSERT INTO tc_gge_file (tc_gge01,tc_gge02,tc_gge03,tc_gge04,tc_gge05,tc_gge06,tc_gge07)
select tc_gge01,tc_gge02,tc_gge03,tc_gge04,tc_gge05,tc_gge06,:new.tc_ggm01 from tc_gge_file
where tc_gge01 :=:new.tc_gge01 and
tc_gge07 :=:new.tc_gge07;
end;
第一次写触发器,写的格式和网上差的oracle触发器格式一样,但就是不成功,没有找到类似where后面写:new参数的,劳烦懂的大佬给看一看