Maison  >  Questions et réponses  >  le corps du texte

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

如题

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

阿神阿神2743 Il y a quelques jours827

répondre à tous(1)je répondrai

  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:18:08

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

    répondre
    0
  • Annulerrépondre