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

select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we destroy the session, how can we unset the variable of a session? : Sql dba

1003


Is oracel sql developer written in java?

1114


What are operators available in sql?

1051


Can dml statements be used in pl/sql?

1082


Why stored procedures are faster than query?

1029


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2226


How do I clear the screen in sql plus?

1047


How do I count rows in sql query?

996


What is recursive join in sql?

1031


what is the difference between undefined value and null value? : Sql dba

1104


What is the difference between a procedure and a function?

1118


Can we rollback truncate?

1001


What is the starting oracle error number? What is meant by forward declaration in functions?

994


What is 19 null in sql?

973


What is the purpose of the primary key?

1065