write the query for find the top 2 highest salary in sql
server

Answer Posted / sivashankar.soma

select ename,sal from emp E where 1=(select count(*) from
emp where E.sal<sal)

Is This Answer Correct ?    16 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

583


How to add an address record into adventureworkslt?

563


what are different types of raid configurations? : Sql server database administration

482


What are the grouping functions?

523


In what version of sql server were synonyms released?

502






What is service broker? : sql server database administration

572


What are the characteristics of modern DBMS?

619


What are the different types of data sources in ssrs?

142


How to create new databases with "create database" statements?

562


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

561


why would you use sql agent? : Sql server database administration

521


Explain about Joins?

600


Does order by actually change the order of the data in the tables or does it just change the output?

651


What is difference in performance between insert top (n) into table and using top with insert?

528


Explain the difference between functions and stored procedures in sql server?

475