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 / nagaraju nampally

select * from (select ename,sal,deptno,dense_rank()
over(partition by deptno order by sal)rnk from emp)x where
x.rnk<5

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to assign a tablespace to a users in oracle?

992


How a tablespace is related to data files?

1062


What is recovery manager in Oracle?

993


How do I connect to oracle database?

1028


What is a select query statement in oracle?

901


What is a server parameter file in oracle?

1004


How to assign values to data fields in record variables?

975


Can a formula column be obtained through a select statement ?

2267


Is there a combination of "like" and "in" in sql?

1007


How to drop a stored function?

1085


A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.

5417


How do you find current date and time in oracle?

990


What are the differences between char and nchar in oracle?

1022


How do we represent comments in oracle?

1003


How oracle handles dead locks?

1021