How to find third or nᵗʰ maximum salary from salary table?

后端 未结 30 693
醉酒成梦
醉酒成梦 2020-11-30 16:30

How to find third or nth maximum salary from salary table(EmpID, EmpName, EmpSalary) in optimized way?

30条回答
  •  暖寄归人
    2020-11-30 17:23

    To get third highest value from table

    SELECT * FROM tableName ORDER BY columnName DESC LIMIT 2, 1
    

提交回复
热议问题