ORACLE 分页SQL语句
2006-08-07 20:42
429 查看
总结了一下几种方法 具体在MSSQL SYBASE下面用top 来分页 POSTGRESQL MYSQL就直接用limit更简单了
在oracle 下面想了4总方法
minus差分页 select * from table where rownum<=10 minus select * from table where rownum<=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
要是有更好的方法 还望多多指教
在oracle 下面想了4总方法
minus差分页 select * from table where rownum<=10 minus select * from table where rownum<=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
要是有更好的方法 还望多多指教
相关文章推荐
- oracle中分页查询的sql语句
- oracle 查询分页sql语句
- ORACLE分页SQL语句
- ORACLE分页SQL语句
- mysql,mssql,oracle分页通用sql语句
- ORACLE分页SQL语句
- oracle 分页查询和sql server 分页查询 的sql语句
- oracle 分页sql语句的深入理解
- ORACLE分页SQL语句
- Oracle 分页查询的 SQL 语句
- Oracle用SQL语句分页
- oracle排序并分页sql语句
- SQL server、MySQL、Oracle分页查询SQL语句
- jsp + oracle 排序分页 高效sql语句
- 使用标准SQL语句实现分页操作(Oracle)
- oracle 分页 很棒的sql语句
- ORACLE分页SQL语句
- Oracle查询分页SQL语句
- springmvc mybatis 分页 控制层及sql语句 oracle mysql easyui
- oracle,mssql,mysql数据库分页时所用的sql语句。