i found using order by with limit to fetch 2nd highest salary from database.may be it can enhance database performance when fetching from large number, rather using sub-query.i want to know how to fetch all the salary starting from 2nd highest salary. i have created table like & db name = one
id salary
1 50
2 20
3 70
4 40
5 85
now to find only the 2nd highest salary
select salary from one order by salary desc limit 1,1
to find the salary of 2nd and 3rd and 4th
select salary from one order by salary desc limit 2,1
how to fetch all the salary starting from 2nd highest without knowing the 2nd limit value.
thanks