SEEKER  

如果mytable表中不存在 ID = 123 的数据,那么

 SELECT Flag INTO flag FROM mytable WHERE ID = 123 将抛出异常ORA-01403

 SELECT nvl(max(Flag),'') INTO flag FROM mytable WHERE ID = 123 则不会有异常

 

具体参考:

http://www.itpub.net/thread-859456-1-1.html

posted on 2015-07-20 17:09  sundigang  阅读(1266)  评论(0编辑  收藏  举报