sql查询字段是否为空

sql 查询某字段为空

select * from 表名 where 字段名 is null

sql 查询某字段不为空

select * from 表名 where 字段名 is not null

sql查询字段1为空且字段2不为空的数据

select * from 表名 where 字段名1 is null and 字段名2 is not null

猜你喜欢

转载自www.cnblogs.com/z-x-y/p/9687901.html
今日推荐