mysql中查询字段替null或者不为null

来源:互联网 发布:凯立德端口检测工具 编辑:程序博客网 时间:2024/04/30 05:06
mysql中查询字段为null或者不为null

        在mysql中,查询某字段为空时,切记不可用 = null,而是 is null,不为空则是 is not null

 

        select * from table where column is null;

        select * from table where column is not null;

0 0