首页 > 代码库 > sql 第 10条 到20条

sql 第 10条 到20条

sql 第 10条 到20条

select * from
( select *,ROW_NUMBER () over (order by @@servername) as rownum from tb_Grade) a
where rownum between 11 and 20

select top(10) * from tb_Grade where 学生编号 not in (select top (10) 学生编号 from tb_Grade)

 

总分前5名的是

select top (20-15 )* from
(select top 20 * from tb_Grade order by 总分 desc) as a
order by 总分 desc

sql 第 10条 到20条