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>
用了子查詢一定要用別名
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。