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
Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication
What command do we use to rename a database?
what is the difference between delete table and truncate table commands? : Sql server database administration
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
Define magic tables in sql server?
Why are sql functions used?
What does top operator do?
Explain the use of containers in ssis?
Define master database?
We need to perform what steps in the following order to work with a cursor?
How sql server enhances scalability of the database system?
Tell me about pre-defined functions of sql?
Explain what role entity and relationship play in an ER diagram.
What is tabulation?
What are constraints?