这是一个创建于 3087 天前的主题,其中的信息可能已经有所发展或是发生改变。
现在只知道用 minus ,
select ... where rownum < 50 minus select ... where rownum < 30
但貌似速度好慢,一亿多条数据的库,每次查 500 条数据出来都要几秒
2 条回复 • 2016-05-11 14:12:48 +08:00
|
|
1
wyj12501 2016-05-11 09:42:18 +08:00
select * from (select rownum rn, a.* from (select * from XXX where YYY order by ZZZ) a where rownum < 50) where rn > 30;
|