解决方法一:加一个exception异常处理

  exception when no_data_found then

    ....

 

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

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

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

posted on 2008-10-17 13:21  李佩亮  阅读(10125)  评论(0编辑  收藏  举报