查询nickname字段不等于空并且也不能等于空字符

1
SELECT * FROM member WHERE nickname IS NOT NULL AND nickname <> '';

查询nickname字段等于null或等于空字符

1
SELECT * FROM member WHERE nickname IS NULL OR nickname = '';