日期:2014-05-17  浏览次数:20931 次

判断游标取过来的值是否null
fetch   tempcur   into   l_nwk_seg;
                  if   tempcur%notfound   then  
                        l_nwk_seg:= 'ppp ';
                  end   if   ;
                  if   tempcur%found   then
                                  l_nwk_seg:= 'ppp2 ';
                                              end   if;

这样可以判断是否为有记录或没记录
但是要判断取过来的字段(就取一个)是否为null怎么判断?

------解决方案--------------------
if l_nwk_seg is null
...
------解决方案--------------------
你上面if 语法没问题

判断是否为null

if 变量 is null then
...
end if;