sql server 2005 排名提供dense_rank() 函数.实现起来非常简单. 示例如下: declare @t table(place int,score int)insert into @t select 11,10union all select 3,10union all select 2,20union all select 2,30select dense_rank()over(order by score ) as id,score from @t/**//*id score-------------------- -----------1 101 102 203 30(4 行受影响)*/