标签:
create proc proc_paging
(
@pageSize int,
@pageCurrent int
)
as
begin
select * from
(select ROW_NUMBER() over(ORDER BY 排序字段) rownum, * from 表) 别名
where rownum between (@pageCurrent - 1)*@pageSize + 1 and @pageCurrent * @pageSize
end
标签:
原文地址:http://www.cnblogs.com/morang/p/4375034.html