sqlserver最简单分页sql
解决方法
从第一行开始去10条数据,id是字段(第一页):
select top 10 id from ( SELECT TOP (100) PERCENT row_number() over( order by id ) as _rownumber , id FROM sys_resources WHERE 1=1 ) A where _rownumber > 0
从第十一行开始去10条数据,id是字段(第二页):
select top 10 id from ( SELECT TOP (100) PERCENT row_number() over( order by id ) as _rownumber , id FROM sys_resources WHERE 1=1 ) A where _rownumber > 1