if 什么情况下 update 成 1 then insert into table1 select ... ; elsif 什么情况下 update 成 2 then insert into table2 select ... ; else 两种情况外,还想干什么不?; end if;
create or replace trigger upd_tg after update of status on tt for each row begin if :new.status = 1 then --insert into table1
elsif :new.status = 9 then -- insert into table12
end if; end;
create or replace trigger tri_tb before update of status on tb for each row begin if :new.status=1 then insert into table1 select .....; elsif :new.status=9 then insert into table2 select .....; end if; end;
insert into table1 select ... ;
elsif 什么情况下 update 成 2 then
insert into table2 select ... ;
else
两种情况外,还想干什么不?;
end if;
create or replace trigger upd_tg
after update of status on tt
for each row
begin
if :new.status = 1 then
--insert into table1
elsif :new.status = 9 then
-- insert into table12
end if;
end;
begin
if :new.status=1 then
insert into table1 select .....;
elsif :new.status=9 then
insert into table2 select .....;
end if;
end;
:old.col只有在修改或者删除的情况下有 在新增的情况下没有