判断数据库某个字段是否为空

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

posted on 2019-07-26 16:07  黎明NB  阅读(5834)  评论(0编辑  收藏  举报

导航