日期:2014-05-17 浏览次数:20476 次
select * ,rn=dense_rank()over(order by cnt desc) from loginCnt
------解决方案--------------------
SQL2000这样用-- count(DISTINCT a.cnt) select *,(select count(DISTINCT a.cnt)+1 from loginCnt a where a.cnt>b.cnt) as 名次 from loginCnt b order by cnt desc