SQL 取表中第几行至第几行数据
第一种:
1 select top 6 * from 2 ( 3 select top 14 * from stu order by id 4 ) as t 5 order by id desc
第二种(推荐):
1 with total as 2 ( 3 select *,row_number() over(order by name) as rownum from stu 4 ) 5 select * from total where rownum between 10 and 15