字段值如果未填,即空(NULL)作为值0处理。

解决方案 »

  1.   

    nvl(expr1,expr2)
    If expr1 is null, NVL returns expr2. If expr1 is not null, NVL returns expr1.
      

  2.   

    NVL(COMM,0)If COMM is null, NVL returns 0If COMM is not null, NVL returns COMM
      

  3.   

    SQL> select 1+'' from dual;      1+''
    ----------SQL> select 1+nvl('',0) from dual;1+NVL('',0)
    -----------
              1效果以上已见证,任何数与空值相加为空