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
What does it mean to invest in the index?
What is the significance of master, tempdb and model databases?
Name some of the open source software that you can use in alternative to SSR?
What are the aggregate and scalar functions?
Call by value and call by reference in procedure and function, with NOCOPY.
How to select some specific rows from a table in ms sql server?
What is a database table?
What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas
What is sql server english query?
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?
Why people hate cursor?
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?
What are the different types of indexes?
How to count groups returned with the group by clause in ms sql server?
Explain what are various ways to enhance the ssrs report?