Oracle用with语句查询第N到第M条记录

2014-11-24 18:31:40 · 作者: · 浏览: 0

with partdata as (select rownum rowno,t.* from table1 t where t.id>200407160000)


select * from partdata where rowno between 10 and 20


当然还有别的方法,但我目前测试这种方法的速度最快。以上代码在Oracle 9i中测试通过。