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

Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

945


What is filtered index?

1089


What is row_number () and partition by in sql server?

1078


How to delete duplicate rows in sql server?

1100


Is foreign key a primary key?

1079


Tell me what is use of except clause? How it differs from not in clause?

959


What are subqueries in sql server? Explain its properties.

1014


Differentiate between a local and a global temporary table?

950


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

1055


Define Joins?

1024


What are the different types of backups avaialabe in sql server 2005?

1013


What new changes are being made in SQL Server?

1178


What have included columns when we talk about sql server indexing?

1033


How efficient you are in oracle and SQL server?

1147


Do you know the capabilities of cursors?

1143