how to find nth highest salary
Answer Posted / satesh naidu
select * from emp e1 where &n=(select count(distinct
(e2.sal) from emp e2 where e.sal>e1.sal)
Hai friends try this.u will get nth highest salary.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to create sub reports?
What are sql server procedures?
What is the difference between a function and a trigger?
Explain differences between web edition and business edition?
What is merge?
Explain what is public role in sql server?
What happens if the update subquery returns multiple rows in ms sql server?
Explain the difference between function and stored procedure?
What is data source view or dsv? : sql server analysis services, ssas
Can you please differentiate between a primary key and a unique key?
What is table valued function and scalar valued functions?
Can we join two tables without primary key?
Do you know concepts and capabilities of sql server?
Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?