举例:
begin
insert into t1 values('1');
insert into t1 values('2');
end;第一个insert出错的时候,我想继续执行第二个,并且不允许异常抛出,该如何做呢?

解决方案 »

  1.   

    是这样吗?beginbegin
    insert into t1 values('1');
    exception
    when others then null;
    end;begin
    insert into t1 values('2');
    exception
    when others then null;
    end;end;
      

  2.   


    begin  begin
        insert into t1 values('1');
      exception
        when others then null;
      end;  begin
        insert into t1 values('2');
      exception
        when others then null;
      end;exception
      null;end;