日期:2014-05-18 浏览次数:20665 次
select *,RANK() OVER(ORDER BY 积分) AS [rank] from tb
------解决方案--------------------
RANK() OVER(ORDER BY )
------解决方案--------------------
declare @t table(id int)
insert into @t
select 1000 union all
select 1000 union all
select 400 union all
select 400 union all
select 100
select *,RANK() OVER(ORDER BY id desc) AS [rank] from @t
--------------------------
id rank
----------- --------------------
1000 1
1000 1
400 3
400 3
100 5