MySQL 使用 group by 之后然后 IFNULL(COUNT(*),0) 为什么还是会获得 null
阿神
阿神 2017-04-17 15:16:08
0
1
818

如题

MySQL 使用 group by 之后然后 IFNULL(COUNT(*),0) 为什么还是会获得 null。

 SELECT IFNULL(count(max_choose_number),0)   FROM t_paper_**** tps WHERE tps.paper_id = 210 AND tps.structure_type = 4 GROUP BY tps.paper_id

结果为 null

阿神
阿神

闭关修行中......

reply all(1)
伊谢尔伦

In this case, there is generally no data that satisfies the where condition. Therefore, null is returned.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!