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 SQL Tuning Advisor in Oracle?
What is the scope of a local variable?
src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));
What are the numeric comparison operations?
How to omit columns with default values in insert statement in oracle?
What are the uses of a database trigger?
How to connect asp pages to oracle servers?
What is the difference between translate and replace?
is there a tool to trace queries, like profiler for sql server?
What is the implicit cursor in oracle?
Which is better Oracle or MS SQL? Why?
How to connect to a local oracle 10g xe server?
What is a nested table?
What is the dynamic sql in oracle?
How to create a table interactively?