how to find nth highest salary
Answer Posted / amit
select * from emp as e1 where sal (n-1) = select distinct
(count(*) from emp as e2 where e2.sal>e1.sal)
Where n is no that u want which postion's salary u want
suppose second higest means n=2
Amit
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What are the steps to take to improve performance of a poor performing query? : sql server database administration
what protocol both networks use? : Sql server database administration
How to create a dynamic cursor with the dynamic option?
What is the sql case statement used for? Explain with an example?
How to create function without parameter in sql server?
What is indexing and its types?
Explain steps of normalization?
Write a sql query to display the current date?
What is the process of normalization?
How to create a trigger for insert only?
What are the differences between user defined functions and stored procedures?
What is indexing in sql server with example?
How do you size a resultset?
Where do we use trace frag?
How do I view a script in sql server?