declare @pagesize int 页数
declare @pagenow int 页面
set @pagesize=10
set @pagenow=3
select *
from (select ROW_NUMBER() over(order by cid) as rownum, *
from Citys) as ttt
where rownum>((@pagenow-1)*@pagesize) and rownum<(@pagesize*@pagenow)
citys 为表名 cid 为表ID
declare @pagenow int 页面
set @pagesize=10
set @pagenow=3
select *
from (select ROW_NUMBER() over(order by cid) as rownum, *
from Citys) as ttt
where rownum>((@pagenow-1)*@pagesize) and rownum<(@pagesize*@pagenow)