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


Please Help Members By Posting Answers For Below Questions

What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

894


What is deploy, process and build? : sql server analysis services, ssas

751


It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

748


Explain difference between control flow and data flow?

713


What are different types of data sources?

648






What is a full text index?

670


What are the different SQL Server Versions you have worked on?

764


Explain indexing and what are the advantages of it?

712


What do you understand by replication in sql server? Mention the different types of replication in sql server.

697


Explain the different types of joins?

745


Difference between DELETE and TRUNCATE?

790


What method is used by the Command classes to execute SQL statements that return single values?

780


What are the joins in sql server? : sql server database administration

735


how many clustered indexes can be created on a table? : Sql server database administration

778


What is the recursive stored procedure in sql server?

711