mysql group by分组查询后 查询个数
2个方法随便你选

<pre>
select count(distinct colA) from table1;
</pre>
<pre>
select count(*) from (select colA from table1 group by colA) gyd;
</pre>

用了子查询一定要用别名

相关文章:

  • 2021-11-30
  • 2021-05-21
  • 2021-06-10
  • 2021-07-18
  • 2021-06-28
  • 2021-05-02
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2021-06-24
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案