错误的写法:
select * from (select t.*,rownum rn from (需要分页的sql)t ) where rn >=1 and rn <=10;
正确的写法:
select * from (select * from (select a.*,rownum rn from (需要分页的sql) a ) where rownum <=10) where rn >=1;
错误的写法:
select * from (select t.*,rownum rn from (需要分页的sql)t ) where rn >=1 and rn <=10;
正确的写法:
select * from (select * from (select a.*,rownum rn from (需要分页的sql) a ) where rownum <=10) where rn >=1;