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 / ravindra reddy

select *from(select b.* from emp b order by sal desc)where rownum<=5 order by sal desc
------------------------------------------------------------
select *from(select b.*,rank() over(order by sal desc) from emp b)where rownum<=5

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get execution path reports on query statements?

929


why dont we assign not null constraint as table level constraint.

2685


State the various uses of dbcc command?

992


How to use regular expression in pattern match conditions in oracle?

977


How to get a list of all user accounts in the database?

1035


How to pass a cursor variable to a procedure?

1042


How to open and close an explicit cursor in oracle?

1002


How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

2209


Explain alias?

1081


What is ordinary table in oracle?

1077


What are the differences between primary key and unique key?

949


defination of bitmap index

2047


when we are importing items in inventory, showing errors, Oracle support suggested us for running scripts & also suggested if we run scripts, iprocurement applicaation if is there it will show shared and if we go in future for iprocurement, it wont work. So kinldy suggest any functional solution.

1936


Explain the use of online redo log files in oracle.

993


What are the parameters that we can pass through a stored procedure?

1000