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

如题

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

阿神
阿神

闭关修行中......

répondre à tous(1)
伊谢尔伦

这个情况一般是没有满足where条件的数据.所以只有返回null.

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!