sqlserver通用分页sql语句
解决方法:
page 指的是当前页码
rows指的是每页显示的记录数
select * from ( select row_number() over(order by tempColumn) tempRowNumber, * from (select top {1} tempColumn = 0, * from
table_name) t ) tt where tempRowNumber > {2};
// {1}等于(page-1)*rows,{2}等于(page-1)*rows+rows;
如果看不懂可以参考:http://www.yayihouse.com/yayishuwu/chapter/1805
本文地址:http://www.yayihouse.com/yayishuwu/chapter/1216