sql server 的存储分页语句
create proc up_GetPageData
@pi int --页码
@ps int --页容量
as
begin
select * from (
select ROW_NUMBER() over(order by id) as RNum,*from table
) as temp
where RNum>(@pi-1)*@ps and RNum<=@pi*@ps
end
再来执行这一条语句exec up_GetPageData 1,4
关注web前端