日期:2014-05-18  浏览次数:20479 次

大家帮忙呀,简单 的语句
一个字段名称为:type

值为党员 和团员  

统计党员和团员的个数

结果集如下:

党员  团员
xxxx         xxxx

------解决方案--------------------
select 党员=(select count(1) from t where type= '党员 '),
团员=(select count(1) from t where type= '团员 ') from t