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