用sqlserver 的分页语句,能查出rownum给页面单独显示.是有序的.或者别的方式写的分页也行,
展开全部
两种分布方式,个人习惯,你自己取舍吧:
定义:
当前页面是page,每页条目数是nums
1.top 方式
select top nums from * from talbe where id not in (select top (page-1)*nums from table order by id) order by id
2.row_number方式
select * from
(select *,ROW_NUMBER() over (order by id ) as 行号 from table) as t
where t.行号 between page*(num-1)+1 and page*num
定义:
当前页面是page,每页条目数是nums
1.top 方式
select top nums from * from talbe where id not in (select top (page-1)*nums from table order by id) order by id
2.row_number方式
select * from
(select *,ROW_NUMBER() over (order by id ) as 行号 from table) as t
where t.行号 between page*(num-1)+1 and page*num
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询