MM们
两种方法,建议你用触发器:create or replace trigger businessafter insert on tbl_businessfor each rowbeginif :new.business_amt =2000000 theninsert into tbl_Rbusiness(business_id,user_id,business_date,business_amt) values (:new.business_id,:new.user_id,:new.business_date,:new.business_amt);end if;end;函数:create or replace function amount return number asv_exists number;beginfor v in (select * from tbl_business) loopif (v.business_amt = 2000000) thenselect count(*) into v_exists from ipwhere business_id = v.business_idand user_id = v.user_idand business_date = v.business_dateand business_amt = v.business_amt;if v_exists = 0 theninsert into ip (business_id,user_id,business_date,business_amt)values (v.business_id,v.user_id,v.business_date,v.business_amt);commit;end if;end if;end loop;end;