select * from (select rownum rm,a.* from table a where....) where rm>=5 and rm<=10;
select * from where rowid in (select rowid from table1 where rownum<=10 minus select rowid from table1 where rownum<5) ----------------------------------------------- select * from (select rownum rn,a.* from table1 a) where rn between 5 and 10
where rowid in
(select rowid from table1 where rownum<=10
minus
select rowid from table1 where rownum<5)
-----------------------------------------------
select * from
(select rownum rn,a.* from table1 a)
where rn between 5 and 10
好像是oracle独有的吧。比如说在postgresDB中好像就不行。
能不能有通用的写法