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
How do I view views in sql server?
What is the difference between createstatement and preparedstatement?
What is difference between cte and view?
What is SQL Server?
What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?
What is the difference between implicit and explicit transaction?
where can you add custom error messages to sql server? : Sql server administration
What is primary key and example?
Explain concepts of analysis services?
What is the difference between insensitive and scroll cursor?
What is an indexing strategy?
What is optimistic concurrency?
What is the use of for clause?
What is the command used to recompile the stored procedure at run time?
What is check constraint in sql server?