how to find nth highest salary
Answer Posted / sikindar
select * from emp where sal=(
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal));
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration
Does index speed up select statements?
What is index, cluster index and nonclustered index?
What is the difference between having clause and where clause in sql server?
What is a trigger what are the advantages of trigger?
What are truncate options available in sql server? : sql server database administration
Explain raiserror in sql server?
How to retrieve error messages using odbc_errormsg()?
What is inner join in sql server joins?
What does it mean if @@cursor_row returns a negative number?
What is reportserver and reportservertempdb ?
Explain few examples of stored procedure over triggers?
What is report snapshot in ssrs?
What are the system database in sql server 2005?
What are translations and its use? : sql server analysis services, ssas