方法一:(適合小資料量)
select * from
(select rownum as 別名 rn, 別名d.* from 表名1 as 別名 d
where rownum<=20
)where別名 rn>=11;
方法二速度較穩定,推薦使用
select * from
(select row_number() over (order by id) as 別名 rn, d.*
from 表名 as 別名 d
)where別名 rn between 11 and 20;
方法三不適合大量資料
select * from 表名1 where rownum<=20
minus
select * from 表名1 where rownum<11;
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...