数据库中查询表中某个字段有值的记录

-- 查询tablename表中fieldname字段有值的记录(不为null且不为空字符串)
select fieldname from tablename where fieldname is not null and fieldname <> ''
原文地址:https://www.cnblogs.com/zhiyin1209/p/12489286.html