如果多出来的字段是最后一个字段 insert into B select t.*,'多出来的字段' from A t大概这个意思 你问的这个问题 跟触发器没啥关系,应该就是插入的时候不知道怎么插入吧
create or replace trigger chufa before insert ON a.A for each row declare tmpvar number; begin insert into b.B( a.col1.a.col2 ,a.col3) select a.col1,a.col2 from a.A wher 1=1; end chufa;
create or replace trigger chufa before insert ON a.A for each row begin insert into b.B( a.col1.a.col2 ,a.col3) select a.col1,a.col2 from a.A wher 1=1; end chufa;
insert into B
select t.*,'多出来的字段' from A t大概这个意思
你问的这个问题 跟触发器没啥关系,应该就是插入的时候不知道怎么插入吧
before insert ON a.A for each row
declare
tmpvar number;
begin
insert into b.B( a.col1.a.col2 ,a.col3)
select a.col1,a.col2 from a.A wher 1=1;
end chufa;
before insert ON a.A for each row
begin
insert into b.B( a.col1.a.col2 ,a.col3)
select a.col1,a.col2 from a.A wher 1=1;
end chufa;
很简答,insert into b.b select *,null from a.a;