sql count统计技巧

select count(1) from table where columnname=value

写成

select count(case when columnname=value than 1 else null) from table  快些

 

posted on 2016-06-06 16:39  wolf12  阅读(873)  评论(0编辑  收藏  举报