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
How to create a view with data from multiple tables?
What is the report builder?
Why use “nolock” in sql server?
What are synonyms?
can you instantiate a com object by using t-sql? : Sql server database administration
What are different types of raid levels?
What do you understand by recursive stored procedures?
How to fine-tune reports?
What is de-normalization in sql database administration? Give examples?
Explain the microsoft sql server delete command?
Explain the purpose of indexes?
What is bit data type?
What do I need to start working with sql studio? : sql server management studio
What is checkpoint in sql server?
Does table partitioning improve performance?