how to find nth highest salary
Answer Posted / harshal
Below query is written assuming table "employee" has a column called "salary".
select salary from (select salary from (select distinct(salary) from employee order by salary desc)where rownum<n) order by salary asc where rownum<1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the template in sql?
What is inline table-value user-defined function?
Explain partitioned view?
How to backup encryption key ?
Why use identity in sql server?
How to change the data type of an existing column with "alter table" statements in ms sql server?
Explain the difference between HTTP and HTTPS in database?
What is microsoft sql server?
How to Insert multiple rows with a single insert statement?
What is awe?
Name few of the dcl commands in sql?
What are the purposes and advantages stored procedure?
What do you mean by authentication modes in sql server?
What is difference between cte and view?
what are the new features introduced in sql server 2000? : Sql server database administration