ITPub博客

首页 > 数据库 > Oracle > [Z]Oracle分页sql

[Z]Oracle分页sql

原创 Oracle 作者:yonniezhao 时间:2007-10-17 12:38:29 0 删除 编辑

select * from (select tt1.*,rownum rowno from (select * from t1) tt1) where rowno between 11 and 20

mins差分页 select * from table where numrow<=10 minus select * from table where numrow<=5

rownum伪列select * from (select rownum tid,t.* from table t where rownum<=10) where tid<=10 and tid>=5

notin相反select * from table where id not in(select id from table where rownum<=5) and rownum<=5

前题是id排序的select * from table where id>(select max(id) from table where rownum<=5) and rownum<=5

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10007212/viewspace-977092/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-05-21

  • 博文量
    37
  • 访问量
    27475