请选择 进入手机版 | 继续访问电脑版

oracle12C offset子句 FETCH子句

[复制链接]
苍野狼步 发表于 2021-1-2 19:43:24 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

  • The row_limiting_clause allows you to limit the rows that are
    returned by the query.
  • Queries that order data and then limit row output are widely used
    and are often referred to as Top-N queries.
  • You can specify the number of rows or percentage of rows to return
    with the FETCH_FIRST keywords.
  • You can use the OFFSET keyword to specify that thereturned rows
    begin with a row after the first row of the full result set.
  • The WITH TIES keyword includes additional rows with the same
    ordering keys as the last row of the row-limited result set (you
    must specify ORDER BY in the query).
You can specify the row_limiting_clause in the SQL
SELECT statement by placing it after the ORDER BY clause.
Syntax:
  1. subquery::={ query_block         | subquery { UNION [ALL] | INTERSECT | MINUS }subquery [ { UNION [ALL] | INTERSECT | MINUS } subquery ]...        | ( subquery ){[ order_by_clause ][OFFSET offset { ROW | ROWS }][FETCH { FIRST | NEXT } [{ row_count | percent PERCENT}] { ROW | ROWS }{ ONLY | WITH TIES }]
复制代码
摘自oracle大学

来源:https://blog.csdn.net/objact/article/details/112070005
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

发布主题

专注素材教程免费分享
全国免费热线电话

18768367769

周一至周日9:00-23:00

反馈建议

27428564@qq.com 在线QQ咨询

扫描二维码关注我们

Powered by Discuz! X3.4© 2001-2013 Comsenz Inc.( 蜀ICP备2021001884号-1 )