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;

猜你喜欢

转载自www.cnblogs.com/sqldata/p/10909868.html