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 / 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

How to update muliple row in single query?

1112


What are binary string data types in ms sql server?

1386


How is sql server used?

1011


Is candidate a key?

1002


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

1267


How can you insert values in multiple rows using one Insert statement?

1148


How do we synchronize On-Premise SQL server with SQL Azure?

124


Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?

1029


What are pessimistic lock and optimistic lock?

1139


How do I view views in sql server?

1058


What is difference between join and natural join?

1057


what method you can use to reduce the overhead of Reporting Services data sources?

268


Please differentiate between a local and a global temporary table?

1058


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

1035


Explain the different types of backups available in sql server? : sql server database administration

983