how to find nth highest salary
Answer Posted / bharath
select distinct(sal) from emp a where 3 = (select
count(distinct(sal)) from emp b where a.sal<= b.sal)
replace 3 by 2 for second highest...
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
what are defaults? Is there a column to which a default can't be bound? : Sql server database administration
What is b tree index?
What are the steps to follow to configure SQL*Net?
What the different components of Replication and what is their use?
What different steps will a sql server developer take to secure sql server?
What is the Difference Between Primary and Foreign Key?
What is acid properties?
Do you know what is a with(nolock)?
How to use values from other tables in update statements in ms sql server?
What is dynamic cursor in SQL SERVER?
Explain the phases a transaction has to undergo?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
what are the important architecture components of SSRS?
Name few of the dcl commands in sql?
What is index fragmentation in ms sql server?