SQL Server分数排序
1、并列排名
1 select 2 IRID, 3 ModelID, 4 mingci=DENSE_RANK() over(order by ModelID) 5 from QuestionaryResult 6 where MODELID is not null
2、顺序排名
1 SELECT 2 ROW_NUMBER() OVER (ORDER BY MODELID)AS Number , 3 ModelID 4 FROM QuestionaryResult WHERE MODELID=98