ANY answer.
Re: i want to get the third highest salary from a table?
I am not sure but it will definitely work just try once.
[sql]( select salary from <tablename> where sal <(select salary from <tablename> where sal <(select max(sal) from <tablename>))) [/sql]
This will give the third highest salary from a table.
And for the second highest salary just remove one phrase that is
[sql]select salary from <tablename> where salary<(select max(salary) from <tablename>)[/sql]
|