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 为一种状态,不是一个值,故建议不适用算术逻辑符号“<>” !

相关文章:

  • 2021-06-15
  • 2022-12-23
  • 2021-06-23
  • 2022-01-03
  • 2022-01-07
  • 2021-12-10
  • 2021-08-30
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案