关于oracle触发器,根据条件插入并赋值的问题

2025-04-13 21:06:33
推荐回答(1个)
回答1:

create or replace trigger insert_B after insert FOR EACH ROW
on A
begin
  IF :NEW.type = 2 and :NEW.applytype = 11 then
    insert into B(id,name,type,applytype,result) values(:NEW.id.:NEW.name,:NEW.type,:NEW.applytype,'Y');
  END IF;
END;
/