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>
用了子查询一定要用别名
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>
用了子查询一定要用别名