xywuyiba7 发表于 2018-9-24 14:48:00

oracle学习之:oracle异常分类

declare  v_emp emp%rowtype;
  begin
  select * into v_emp from emp;--该处会捕捉到异常,然后转到异常处理部分
  exception
  when too_many_rows then   --too_many_rows 是oracle预定义的异常名称,该异常的异常号为-01422
  dbms_output.put_line(sqlcode||sqlerrm);
  when others then
  dbms_output.put_line(sqlcode||sqlerrm);
  end;

页: [1]
查看完整版本: oracle学习之:oracle异常分类