总结了一下几种方法 具体在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

要是有更好的方法 还望多多指教

更多相关文章

  1. php使用mysql数据库时中文不显示或显示异常解决方法
  2. 保存在Java桌面应用程序应用程序和网站上使用的个人用户设置的最
  3. MySQL 存储过程查询远程数据库的方法
  4. 有没有更好的方法来编写这个MySQL查询?
  5. 计算机管理没有mysql服务项的解决方法
  6. mysql 批量更新与批量更新多条记录的不同值实现方法
  7. 远程连接Linux虚拟机上的mysql失败的解决方法
  8. PHP OOP和MySQLi连接=致命错误:调用未定义的方法sqmyli::arrayQu
  9. MySQL忘记root密码??重置密码方法

随机推荐

  1. Android:Debug certificate expired on D
  2. android 获取设备型号
  3. android > 调用拨打电话 并子线程监控然
  4. 基于Phone模块的Service实现
  5. Android API 指南
  6. Android使用系统Intent实现分享功能及将
  7. android横屏竖屏 实现
  8. Android游戏开发学习(1)--android设置全
  9. Dealing with bitmap object in android
  10. Android 视频播放