oracle

推荐列表 站点导航

当前位置:首页 > 数据库 > oracle >

oracle通过行范围查询取4至10行并排序

来源:网络整理  作者:网络  发布时间:2020-12-08 01:37
这篇文章主要介绍了oracle如果查询取4至10行并排序,很简单,很实用,正在学习oracle的朋友可以参考下 不能直接用...
这篇文章主要介绍了oracle如果查询取4至10行并排序,很简单,很实用,正在学习oracle的朋友可以参考下      

不能直接用rownum,要查询出来以后用别名转换。

以EMP表为范例,取4至10行:

select * from (select rownum id,t.* from emp t) where id between 4 and 10;

有需要排序的,一定要这样处理:

select * from ( select rownum rn,t.* from ( select a.* from eba02 a order by eba003) t where rownum <= 110) where rn >= 110;

相关热词: oracle

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://www.juheyunku.com/sql/oracle/1262.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

oracle通过行范围查询取4至10行并排序

2020-12-08 编辑:网络

这篇文章主要介绍了oracle如果查询取4至10行并排序,很简单,很实用,正在学习oracle的朋友可以参考下      

不能直接用rownum,要查询出来以后用别名转换。

以EMP表为范例,取4至10行:

select * from (select rownum id,t.* from emp t) where id between 4 and 10;

有需要排序的,一定要这样处理:

select * from ( select rownum rn,t.* from ( select a.* from eba02 a order by eba003) t where rownum <= 110) where rn >= 110;

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://www.juheyunku.com/sql/oracle/1262.shtml

相关文章

风云图片

推荐阅读

返回oracle频道首页