首页 > 技术资讯 >

mysql 查询出某字段的值不为空的语句,越基础,越是常用

编辑:未知 发布时间:2021-05-15 浏览次数:0 人次 对比搜索

mysql 查询出某字段的值不为空的语句

 

1.不为空

select * from table where id <> "";

select * from table where id != "";

select * from table where is not null;

2.为空

select * from table where id ="";

select * from table where isNull(id);

select * from table where id is null;