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

What are the two modes of authentication in sql server?

1070


What is a data source or ds? : sql server analysis services, ssas

1009


What is data source in connection string?

913


How many levels of sp nesting is possible?

1057


What are ddl triggers and types of ddl trigger?

1040


What is the purpose of update statistics and scope_identity() function?

1100


What are the requirements on sql server network connections?

1001


How to get @@error and @@rowcount at the same time?

1036


When you should use a low fill factor?

994


Explain what is lock escalation and what is its purpose?

932


How to filter records of table in SQL SERVER?

1086


How do I edit a stored procedure in sql server?

929


Does group by or order by come first?

963


What is transaction server implicit?

1015


How to see existing views in ms sql server?

1046