要动态的变化分页查询的条件,比如pageNow 这个变量表示的是当前是第几页,
oracle分页有通用写法,假设一页5行
select * from (
select t.*,rownum rn from (
select * from table1 where condition order by column) t )
where rn >(pangeNow-1)*5 and rn <=(pageNow)*5
如果基础查询不需要排序,可以省掉一层嵌套
select * from (
select t.*,rownum rn from table1 t where condition )
where rn >(pangeNow-1)*5 and rn <=(pageNow)*5