要查询某个字段是不是为NULL 一定要用IS NULL哪怕 null=null 也是不行的SQL> select * from dual where null=null;DUMMY
-----SQL> select * from dual where null is null;DUMMY
-----
Y

解决方案 »

  1.   

    is null 和  is not null 是标准的SQL语法,用 = NULL 和 <> NULL 虽语法没有错,但什么结果也查询不出来。
      

  2.   

    =null 什么也查不到
    is null 可以查到为null的字段的内容
      

  3.   

    补充一点:null不能作为索引来使用.
    例如:
    select * from td_b_feeset a where a.feesetcode is null;
    这样会全表扫描.
      

  4.   

    null=null在Oracle中是永远不成立的,因为=表达式是存在值的对比,所以要判断某字段是否无值只能用is null