mysql count返回0和NULL

正常情况下 count 为空返回0;

如果查询的结果为空,且使用了 group by ,则 count() 返回NULL

例如:

select count(*) from test_table where company=223 group by id;

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注