Home > Database > Mysql Tutorial > body text

Oracle 基本查询 查看排名

WBOY
Release: 2016-06-07 17:13:10
Original
1395 people have browsed it

1- 求排名前6-10 的员工 方法一: select employee, salary from ( select employee, salary, row_number() over (order by

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 专题页面 ?tid=12

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template