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

Query for second maximum salary in each in each department

Answer Posted / sureshramsing

select * from(select row_number() over(partition by deptno order by sal desc) rn,a.* from emp a) where rn=1;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between inner join and left join?

1041


Does sql backup shrink transaction log?

1045


how to add a new column to an existing table in mysql? : Sql dba

1115


what is sql profiler? : Sql dba

1115


What is bulk compiling in pl/sql.?

1193


What does a pl/sql package consist of?

1019


what are aggregate and scalar functions? : Sql dba

1110


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

999


how to calculate the difference between two dates? : Sql dba

1116


How do I copy a table in sql?

1037


how to calculate expressions with sql statements? : Sql dba

1096


How to convert comma separated string to array in pl/sql?

1242


Explain unique key in sql.

1063


Can we commit in trigger?

1029


What is sql deadlock?

1219