0
我的MySQL數據庫的表結構是:MySQL的:基於字段數行命名
id | status
1 | Open
2 | Open
3 | Closed
4 | Open
5 | Closed
,我想指望開和關行的總數。
Status | Total
Open | 3
Closed | 2
我用
SELECT count(distinct status) as Total FROM my_tbl
但它返回
Total
2
感謝ü。謝謝你。謝謝你。 – 2012-02-02 08:24:17