how to find nth highest salary
Answer Posted / premsagar12
SELECT DISTINCT(A.SAL),ENAME FROM EMP A WHERE &N=(SELECT
COUNT(DISTINCT(B.SAL )) FROM EMP B WHERE A.SAL<=B.SAL);
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What are the different SQL Server Versions you have worked on?
What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
What do you understand by mirroring and mention the advantages of the mirroring?
What is raid, and how it can influence database performance?
How to select all columns of all rows from a table with a select statement in ms sql server?
Show Practically Sql Server Views are updatable?
What is sub query and its properties?
What is indexing and its types?
What is difference in performance between insert top (n) into table and using top with insert?
How to maintain a fill factor in existing indexes?
What is implicit mode in sql server?
what is the difference between delete table and truncate table commands? : Sql server database administration
How to create an index on an existing table in ms sql server?
is there a column to which a default can't be bound? : Sql server database administration
Can select statements be used on views in ms sql server?