i want to know the n'th highest value from a column of a table
for eg:
2nd highest salary from tbl_salary
or
4th highest salary from tbl_salary
i seen somewhere below query
select salary from tbl_salary t
where &n = (select count(salary)
from (select distinct salary from tbl_salary)
where t.salary<=salary);
if this is correct then please tell me how it works?
or is there any other simple way to get result?