select * fr om bsinfouser. infobase wh ere id in(select id from (select id,ro wnum n from bsinfouser.infobase ) whe re n<=3450 and n>=21)select * from (select a.*,rownum n from bs infouser.infobase a) where n<=3450 and n>=21分页用的,哪个好,大家讨论一下,
调试欢乐多
直接把页数算好了
select * from bsinfouser. infobase where n <=num1 and n>=num2 不就行了?
谢谢 vc555 提醒buffalodong326 你那句应该语法上有错误吧!
1.使用stopkey
2.先在索引分页,然后再回表。
直接把页数算好了
select * from bsinfouser. infobase where rownum <=num1
minus
select * from bsinfouser. infobase where rownum <num2
不就行了?
而且我试过这样似乎比之前极为给出的写法速度更快一些如果大数据量