text字段不能用 IS NOT NULL
判断非空,要用!=''
来判断非空
//这里的comment是text属性字段,返回评论过的订单数量
select count(comment) as comment from orders where comment != '';
//返回没有评论过的订单数量
select count(comment) as comment from orders where comment = '';
但是其他字段需要用 IS NOT NULL
判断非空,IS NULL
判断为空