select * from tablename a where (select count(*) from tablename where stu_Score>a.stu_Score or stu_Score=a.stu_Score and id<=a.id) between 10 and 20
select *,(select count(*) from tablename where stu_Score>a.stu_Score or stu_Score=a.stu_Score and id<=a.id) as 名次 from tablename a where (select count(*) from tablename where stu_Score>a.stu_Score or stu_Score=a.stu_Score and id<=a.id) between 10 and 20
SELECT TOP 10 * FROM TEST WHERE id not in(SELECT TOP 10 id FROM TEST ORDER BY stu_Score) ORDER BY stu_Score,id
SELECT B.Id, B.Stu_Name, B.Stu_Score FROM (SELECT A.*, ROW_NUMBER() OVER(ORDER BY StuScore DESC) AS RowId FROM StudentScore A) AS B WHERE B.RowId BETWEEN 10 AND 20
select top 10 * from TblName where stu_Score >(select max(stu_Score) from (select top 10 stu_Score from TblName order by stu_Score desc)as tblTmp) order by stu_Score
where (select count(*) from tablename where stu_Score>a.stu_Score or stu_Score=a.stu_Score and id<=a.id) between 10 and 20
where (select count(*) from tablename where stu_Score>a.stu_Score or stu_Score=a.stu_Score and id<=a.id) between 10 and 20
FROM
(SELECT A.*, ROW_NUMBER() OVER(ORDER BY StuScore DESC) AS RowId FROM StudentScore A) AS B
WHERE B.RowId BETWEEN 10 AND 20