how to find nth highest salary
Answer Posted / deepak dabi
I Think this is the best solution ever i have seen ,i
appriciate if you prove me wroong on this so,otherwise i got
all other a bit wrong ,in many cases please try this....
"SELECT distinct(sal) from emp order by sal desc limit 2,1"
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is nolock hint in sql server 2008
What is the purpose of forms?
What is clustered primary key?
What is user-defined function?
Give the query of getting last two records from the table in SQL SERVER?
What are the different authentication modes in sql server? How can it be changed?
Working with TLogs
How can delete duplicate records in cte in sql server?
Does sql server 2000 full-text search support clustering?
How we can compare two database data?
What type of locking occurs during the snapshot generation? : sql server replication
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
How do I get Report Builder to generate a parameter that can be set by users viewing the report?
What are system databases into sql server (2005/2008)?
Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?