create proc p_存储过程名
@当前页 int,@每页显示多少条 int
as
select * from (select *,ROW_NUMBER() over(order by id) as 排序 f rom (表名)) a
where 排序 between (@当前页-1)*@每页显示多少条+1 and @当前页*@每页显示多少条
go
create proc p_存储过程名
@当前页 int,@每页显示多少条 int
as
select * from (select *,ROW_NUMBER() over(order by id) as 排序 f rom (表名)) a
where 排序 between (@当前页-1)*@每页显示多少条+1 and @当前页*@每页显示多少条
go