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

Answer Posted / nilesh

select * from employee2 e where 2=(select count(distinct salary) from employee2
where e.salary<=salary)

Its working.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean to invest in the index?

481


What is the significance of master, tempdb and model databases?

505


Name some of the open source software that you can use in alternative to SSR?

103


What are the aggregate and scalar functions?

487


Call by value and call by reference in procedure and function, with NOCOPY.

809






How to select some specific rows from a table in ms sql server?

543


What is a database table?

501


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

568


What is sql server english query?

517


When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?

546


Why people hate cursor?

707


Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

526


What are the different types of indexes?

584


How to count groups returned with the group by clause in ms sql server?

534


Explain what are various ways to enhance the ssrs report?

540