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...

how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / karthik

select * from (select ename,eno,dept,sal,row_number() over
(partition by dept order by sal desc)top5 from emp) where
top5 <= 5

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to retrieve the count of updated rows?

1198


How to find out what oracle odbc drivers are installed?

1096


What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

2341


How to rename a tablespace in oracle?

1130


material view and view disadvantages?

1128


What privilege is needed for a user to query tables in another schema?

1035


What is a tns file?

1048


How to retrieve data from an explicit cursor?

1111


Explain a private synonyms?

1100


How to create a testing table in oracle?

1038


What is materialized view in Oracle?

1117


What is the difference between post-database commit and post-form commit?

1288


How to sort the query output in oracle?

1077


What is oracle sid?

1007


How to start your 10g xe server from command line?

1132