有一列有的数据没填,select 出来的时候怎么让没有数据的记录自动变成0?

解决方案 »

  1.   

    select nvl(your_column, 0) from your_table;
      

  2.   

    select nvl(column, 0) from tablename;
      

  3.   

    nvl(col,0)
    case when col = '' then '0' end
    DECODE(col,'','0')
      

  4.   

    nvl(col,0)
    case when col is null then 0 else col  end
    DECODE(col,'',0,col)
      

  5.   

    nvl(col,0)
    case when col is null then 0 else col end
    DECODE(col,'',0,col)
    额,我写错了。谢谢minitoy。
    学习中……