Welcome 微信登录

首页 / 数据库 / MySQL / Oracle 基本查询 查看排名

1- 求排名前6-10 的员工 方法一:select employee, salary
  from (
    select employee, salary, row_number() over (order by salary desc) r
      from salary_table
  )
where r between 6 and 10;======================================方法二:
select employee, salary
  from (
    select employee, salary, rank() over (order by salary desc) r
      from salary_table
  )
where r between 6 and 10;更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle 设置数据库参数 使用户能调用系统对象Oracle 查询跟踪的更新相关资讯      Oracle数据库基础教程 
  • 在Oracle数据库中插入含有&符号的  (03/06/2013 09:20:14)
  • Oracle 执行计划更改导致数据加工  (02/13/2013 14:45:04)
  • 判断Oracle Sequence是否存在  (02/13/2013 14:32:26)
  • Oracle数据库中无法对数据表进行  (02/26/2013 14:24:58)
  • Oracle 在同一台主机上建立用户管  (02/13/2013 14:40:58)
  • Oracle em 无法启动,报not found错  (02/13/2013 14:29:48)
本文评论 查看全部评论 (0)
表情: 姓名: 字数