方法一:
select * from
(select * from
(select * from
(select * from(select * from product order by id asc)where rownum<5*2+1
)order by id desc
) where rownum<5+1 //1表示一頁 5表示個數
)order by id asc
方法二:
select * from
(select rownum rn ,a.* from
(select * from product order by id asc)
a where rownum<=3*5 //3表示三頁 5表示個數
)where rn >(3-1)*5
方法三:
select * from
(select * from
(select rownum rn,p.* from product p order by id asc)
where rn<=5*3 //3表示三頁 5表示個數
) where rn>5*(3-1)
ORACLE分頁查詢
單錶分頁 start num 起始行號 end num 截止行號 select t.from select s.rownum rn from table s where rownum end num t where rn start num 多表分頁 select from select temp....
Oracle分頁查詢
oracle的分頁查詢語句基本上可以按照本文給出的格式來進行套用。分頁查詢格式 select from select a.rownum rn from select from table name a where rownum 40 where rn 21 其中最內層的查詢select from t...
oracle 分頁查詢
1 要把rowid來分 select from t xiaoxi where rowid in select rid from select rownum rn,rid from select rowid rid,cid from t xiaoxi order by cid desc where r...