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 four major operators that can be used to combine conditions on a where clause?
Can the query output be sorted by multiple columns in ms sql server?
What is difference between inner join and join?
What is the guest user account in sql server? What login is it mapped to it? : sql server security
What are the tool windows in sql server management studio? : sql server management studio
How to assign null values to variables or columns?
How do you create type- insensitive operator?
How do I create an extended event in sql server?
How to use linked server?
What is difference between count (*) and count 1?
How to connect ms access to sql servers through odbc?
What is the cpu pressure?
What is the difference between dropping a database and taking a database offline?
How to automatically create a log when an exception is being received into SQL Server?
Do you know how to store and query spatial data?