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

In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col

4167


WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?

2307


Is there any function in oracle similar like group_concat of mysql?

1049


Why we use bulk collect in oracle?

1040


How many types of synonyms in Oracle?

1117


How to view existing locks on the database?

1049


How to loop through a cursor variable?

1082


What is a proxy object?

1061


What are the types of trigger in oracle?

975


What is a database table in oracle?

1019


What is backup in Oracle?

998


What is transport network substrate (tns) in oracle?

1041


How to create tables for odbc connection testing?

1110


What are the uses of a database trigger?

994


What is java oracle used for?

1019