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 / neeraj sharma

select ename,sal from emp where rownum<=3 order by sal desc

Note:- every table has rownum column but it is hidden by
default you can see it by this
select rownum from your_table_name

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is normalization and its types?

1032


Where cross join is used?

960


what is sql server? : Sql server database administration

986


How can you set the threshold at which sql server will generate keysets asynchronously?

986


What is the difference between commit and rollback?

942


How to find the second highest salary of an employee?

1179


How to specify the collation for a character data type in ms sql server?

1030


What are the restrictions that views have to follow? : SQL Server Architecture

1001


what do you understand by change data capture?

1018


What is a deadlock and what is a live lock?

1001


Explain multiserver query

1042


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

1203


What is a partition function in sql server?

1133


How to write a query with a left outer join in ms sql server?

983


Where is localdb stored?

942