How to find n'th highest value of a column?

前端 未结 8 1436
不思量自难忘°
不思量自难忘° 2021-02-20 07:56

Is there a command akin to:

  • 2nd highest salary from tbl_salary or

  • 4th highest salary from tbl_salary ?

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-20 08:31

    You can do it using the limit clause:

    select * from tbl_salary order by salary desc limit 2,1;
    

提交回复
热议问题