`

ORA-01403:no data found 解决方法两则

阅读更多
解决方法一:加一个exception异常处理

begin
    you logic
  exception when no_data_found then
      you need operate/null;
  end;



解决方法二:更改select语句,如:

  select count(*) field into var from table where ....

增加一个count(*)即使没有找到数据,也会返回0,而不是null。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics