select b.* from
(
select a.*,rownum as sortnum
from resumes A
where rownum<=60
order by a.resume_id desc
) b
where b.sortnum>=40
这样就可以了
(
select a.*,rownum as sortnum
from resumes A
where rownum<=60
order by a.resume_id desc
) b
where b.sortnum>=40
这样就可以了
你的roder by无效
正确的方法是要写2层嵌套。
select *
from (select rownum myrownum, tt.*
from (
your sql
) tt
where rownum < 60) ttt
where myrownum >= 40