select * from tb where ns is null

解决方案 »

  1.   

    因为null不等于任何值..任何值都不能与null比较...任何值与null比较.都得null
      

  2.   

    select * from 表名 where isnull(ns,'') <>'1'
      

  3.   

    select * from 表名 where ns <>'1' OR ns IS NULL
      

  4.   

    必须这么写:
    select * from 表名 where ns <>'1' or ns is nullnull是特殊的东西,用来跟别的数据比较的结果都是false。
      

  5.   

    null表示未知值, null与任何其它值比较的结果都是未知的,只能用is null or is not null检查,
    或者select * from 表名 where isnull(ns,'') <>'1'
      

  6.   

    谢谢大家,对不起,是我的表达有误,我要查的不只是那些ns列为null的数据,而是所有ns列不为1的数据(包括ns列为null的数据),wufeng4552的回答应该是满足我的要求的