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

Does view occupy space?

887


What is subquery? Explain the properties of a subquery?

927


Difference between report and query parameter. Why do we need different type of parameter?

906


What is change data capture (cdc) feature?

1001


Why SQL Agent is used?

1067


Can you roll back the ddl statement in a trigger?

915


What it means to be triggered?

914


What is the difference between functions and scalar functions?

1127


What is difference between group by and having?

911


What is the full form of ddl?

866


How to get the definition of a stored procedure back?

922


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

902


What is etl - extraction, transformation, and loading?

860


How to return the top 5 rows from a select query in ms sql server?

1076


Write down the syntax and an example for create, rename and delete index?

925