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 rendering extensions of ssrs?
Tell me what are the essential components of sql server service broker?
What is the purpose of forms?
Explain the difference between functions and stored procedures in sql server?
What are the five major components of a dbms?
What is create statement?
Describe in brief system database.
What are the triggers in sql?
What is query and its types?
What is store procedure? When do you use?
Do you know what are the properties of the relational tables?
What it means to be triggered?
Mention what are the different types of ssrs reports?
Write a query for primary key constraint with identity key word?
Why SQL Agent is used?