真分页(要的是什么范围的记录在数据库查的时候就只查这几条记录):
select s.* from (select *,row_number() over(order by SLoginId) as row_number from student) as swhere row_number between ? and ?
假分页(它至少要查你要的记录数以上的记录个数。你查5条可能查了几十条以后再在里面查你要的5条的):
模板select top rowsPerpage from table where id not in(select top (curPage-1)*rowsPerpage id from table)
例子:select top 5 * from student where sid not in(select top 5 sid from student) ----第二页

相关文章:

  • 2021-07-08
  • 2021-07-10
  • 2021-11-02
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2021-06-13
相关资源
相似解决方案