Classic Jhumka Earrings Silver INR 113.00 Free Shipping Buy Now
Black Jhumka Earrings & Studs INR 94.00 Free Shipping Buy Now
Classic Jhumka Earrings Silver INR 207.00 Free Shipping Buy Now
Beautiful stud earing INR 93.00 Free Shipping Buy Now
Different Size Hoop and Stud Earrings Set INR 243.00 Free Shipping Buy Now
Golden Hoop Earing INR 70.00 Free Shipping Buy Now
Home Questions & Answers Technology MySQL Question Answers How to display Nth highest salary from a table in a MySQL query?

    How to display Nth highest salary from a table in a MySQL query?

  • Let us take a table named employee.

    To find Nth highest salary is:

     
    1. select distinct(salary) from employee order by salary desc limit n-1,1  

    if you want to find 3rd largest salary:

     
    1. select distinct(salary) from employee order by salary desc limit 2,1