当前所在位置:珠峰网资料 >> 计算机 >> Oracle认证 >> 正文
Oracle认证辅导:Oracle分页语句
发布时间:2010/3/9 18:18:03 来源:城市学习网 编辑:jo
page size :3
  page number: 2
  需要考虑order by 的情况:
  select s.* from
  (
  select rownum as rn,c.*
  from (select * from tableName order by columnName desc) c
  ) s
  where s.rn between 3*(2-1)+1 and 2*3;
  select * from
  (
  select rownum as rn,c.*
  from (select * from tableName order by columnName asc) c
  where rownum<2*3+1
  ) s
  where s.rn>3*(2-1);
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved