首页 > 技术文章 > Mysql查询不为null值和字段为null 阿星小栈

dereckbu 2018-07-27 15:22 原文

 

在mysql中,查询某字段为null空时,切记不可用 = null,而是 is null,不为空则是 is not null 而不是 != null
   
select * from table where column is null;
 
select * from table where column is not null;

推荐阅读