select count(1) from table where columnname=value
写成
select count(case when columnname=value than 1 else null) from table 快些
select count(1) from table where columnname=value
写成
select count(case when columnname=value than 1 else null) from table 快些
转载于:https://www.cnblogs.com/wolf12/p/5564282.html