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

转载 请注明原文地址并标明转载:http://www.cnblogs.com/laopo 商业用途请与我联系:lcfhn168@163.com
原文地址:https://www.cnblogs.com/laopo/p/4211931.html