解决方法一:加一个exception异常处理
exception when no_data_found then
....
解决方法二:更改select语句,如:
select count(*) field into var from table where ....
增加一个count(*)即使没有找到数据,也会返回0,而不是null。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15881763/viewspace-695778/ ,如需转载,请注明出处,否则将追究法律责任。