能不能试试用隐式游标判断表1是否插入成功,如果不成功就抛出异常。因为我机子上没装过oracle,以下代码未经调试,你试一下
DECLARE
  bad_credit EXCEPTION;
begin
   insert into scott.a2(ab1,ab2,ab3)          --1
   if sql%rowcount=0 then
       RAISE bad_credit;
   end if
   select aa1,aa2,'1' from scott.a1;          --1    
   
   insert into scott.a2(ab1,ab2)              --2   
   select aa1,aa2 from scott.a1;              --2  
    exception
     when bad_credit then
        dbms_output.put_line('插入错误');
        rollback;
     when others then
        dbms_output.put_line('插入错误');
        rollback;
 end;