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

select * from (
select dense_rank() over (order by salary desc) rno,* from
employees ) as a where rno in(1,2)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you Implement SSIS Packages in your Project?

1889


What does it mean to invest in the index?

929


What is the default schema of your login session in ms sql server?

1016


How to create a new login name in ms sql server?

1025


What is log shipping? Can we do logshipping with SQL Server 7.0 ?

948


Explain what are various ways to enhance the ssrs report?

1014


What is function of ROLLUP ?

1057


How to use order by with union operators in ms sql server?

987


What is in place upgrade in sql server?

1011


What stored by the model?

1009


What do you mean by subquery?

1051


What are the extra roles available in msdb? : sql server security

1101


What is attribute? : sql server analysis services, ssas

996


What is the use of sign function?

1069


What are Row versions of DataRow?

997