sql 2005 row_number分页

原文链接:http://www.cnblogs.com/linlin/archive/2011/05/10/2042092.html
declare @pagesize int,@currentpage int
set @pagesize=10--每页显示数量--
set @currentpage=2--当前页--
;with cte as (
	select row_number() over(order by id desc) as number,* from DS_Brand
)
select * from cte where number between (@currentpage-1)*@pagesize+1 and @currentpage*@pagesize

转载于:https://www.cnblogs.com/linlin/archive/2011/05/10/2042092.html

上一篇:表格分页——tablePagination


下一篇:linux 学习6 软件包管理 资料链接