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

Define self join?

1078


How can we get count of the number of records in a table?

996


Describe and explain about SQL native client?

1158


What are the difference between “where” and “having” clause in sql server?

1132


What is difference between rownum and row_number?

1024


Can you roll back the ddl statement in a trigger?

1021


What is data modification?

1018


Do you know what is xpath?

1154


What is create statement?

1010


Types of Authentications in Sql Server? How user gets authenticated through windows authentication?

1099


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

125


In what version of sql server were synonyms released?

1000


Differentiate sql server reporting services vs. Crystal reports?

209


What are orphan records?

986


What is the sql server agent?

1146