数据库中查询表中某个字段有值的记录
-- 查询tablename表中fieldname字段有值的记录(不为null且不为空字符串)
select fieldname from tablename where fieldname is not null and fieldname <> ''
-- 查询tablename表中fieldname字段有值的记录(不为null且不为空字符串)
select fieldname from tablename where fieldname is not null and fieldname <> ''