SQL 查询某字段id为空(不为空)

1 sql 查询某字段id为空

  

    select *  from  表名 where  id  is   null  ;

2 sql 查询某字段id不为空

    select * from   表名  where id  is  not  null;

或 select * from   表名  where id  <> null;     //

    select * from   表名  where   len(id) >1;    // (最后两个PL/SQL下验证不正确!)

 由于null 为一种状态,不是一个值,故建议不适用算术逻辑符号“<>” !

原文地址:https://www.cnblogs.com/facial/p/4371107.html