longshiyVip

要动态的变化分页查询的条件,比如pageNow 这个变量表示的是当前是第几页,

oracle分页有通用写法,假设一页5行
select * fromselect t.*,rownum rn from (
        select * from table1 where condition order by column) t )
    where rn >(pangeNow-1)*5 and rn <=(pageNow)*5
如果基础查询不需要排序,可以省掉一层嵌套
select * fromselect t.*,rownum rn from table1 t where condition )
    where rn >(pangeNow-1)*5 and rn <=(pageNow)*5

分类:

技术点:

相关文章:

  • 2021-11-20
  • 2021-12-28
  • 2021-12-18
  • 2021-12-18
  • 2021-12-28
  • 2021-11-20
  • 2021-09-18
猜你喜欢
  • 2021-12-18
  • 2021-09-19
  • 2021-12-28
  • 2021-12-18
相关资源
相似解决方案