find out the third highest salary?
Answer Posted / ashok naik
In Sql server:
Select top 1 ThirdHighest.salary from(
Select distinct top 3 salary from employee order by salary
desc) as ThirdHighest
--example for 4th highest salary in above query put 4
inplace of 3
--example for 5th highest salary in above query put 5
inplace of 3
--and so on for nth highest
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a nvl function? How can it be used?
What is an external table?
What is SQL access advisor in Oracle?
What privilege is needed for a user to delete rows from tables in another schema?
Is it possible to insert comments into sql statements return in the data model editor ?
What is bind variable in oracle 11g?
What is a subquery?
What is a cursor variable?
How to pass a cursor variable to a procedure?
how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?
How to assign query results to variables?
What are the uses of Database Trigger ?
I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database
In which language oracle has been developed?
When do we use group by clause in a sql query?