PLSQL脚本中自定义异常的简单使用

第一步:自定义异常

excp_notexists exception

第二步:捕获异常

begin
                select *** into *** from *** where ***;
               
                exception
                  when no_data_found then
                      raise excp_notexists;
end;

第三步:处理异常

exception
    when excp_notexists then
      -- 处理异常

    when others then

      --处理其它异常

原文地址:https://www.cnblogs.com/zheng-hong-bo/p/3386428.html