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 / suneelkumar

select * from emp x where 2=(select count(distinct sal) from
emp y where x.sal<=y.sal) group by deptno;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is bcp? When is it used?

1124


What is the sql query to display the current date?

1056


What is duration in sql profiler trace?

1092


What is cursor and its types?

1084


Can we perform dml on view?

1055


Name the operator which is used in the query for pattern matching?

968


what are aggregate and scalar functions? : Sql dba

1068


Why do we use set serveroutput on?

981


How to order siblings in oracle hierarchy queries?

1057


What is example of database?

1067


What is the execution plan in sql?

1038


What is cartesian join in sql?

1141


What are the key differences between SQL and PL SQL?

1226


Can we commit in trigger?

988


How to raise user-defined exception with custom sqlerrm ?

1141