Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 is the difference between update lock and exclusive lock?

1028


How to replace given values with null using nullif()?

1040


Can two tables share the same primary key?

987


What is a fan-out query in SQL Azure?

123


What is SQL Server?

1273


What is implicit cursors?

1135


How to transfer data from a cursor to variables with a "fetch" statement?

1146


How many cores do I need for sql server 2016?

953


What is optimization and its types?

1040


Tell me what is difference between clustered and non clustered index?

982


How to add a new column to an existing table with "alter table ... Add" in ms sql server?

1052


How will you know when statistics on a table are obsolete?

1129


How data can be copied from one table to another table?

1004


How to list all schemas in a database?

1103


What is always encrypted?

1057