霍钧城吧 关注:6贴子:150
  • 0回复贴,共1

Mysql和oracle分页查询

只看楼主收藏回复

mysql方案:select * from t order by idlimit 30,10
select * from t order by idlimit (pageNo-1)*pageSize, pageSize
oracle方案:select * from (select rownum r,* from t where r<=40) wherer>30
select * from (select rownum r,* from t where r<= pageNo* pageSize) wherer>( pageNo -1)* pageSize


1楼2013-12-26 10:48回复