sql 2005 row_number分页
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
作者:蓝丶 sky
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。