write the query for find the top 2 highest salary in sql
server
Answer Posted / uday
select * from Emp e where 1=(select count(Distinct
d.esal)from emp d where d.esal>e.esal)
i am sure that it should work.
Any thing wrong plz inform me
| Is This Answer Correct ? | 5 Yes | 9 No |
Post New Answer View All Answers
How to update muliple row in single query?
What are binary string data types in ms sql server?
How is sql server used?
Is candidate a key?
why would you use sql agent? : Sql server database administration
How can you insert values in multiple rows using one Insert statement?
How do we synchronize On-Premise SQL server with SQL Azure?
Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?
What are pessimistic lock and optimistic lock?
How do I view views in sql server?
What is difference between join and natural join?
what method you can use to reduce the overhead of Reporting Services data sources?
Please differentiate between a local and a global temporary table?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
Explain the different types of backups available in sql server? : sql server database administration