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 the file extension for sql database?

997


Can we join same table in sql?

1014


How do you optimize a stored procedure in sql?

948


Describe sql comments?

1027


How do I get sql certification?

964


What do you understand by pl/sql records?

1014


Does sql backup shrink transaction log?

974


Is not null in sql?

988


What is the benefit of foreign key?

1020


How do I install microsoft sql?

1043


How does sql store data?

902


What is difference between stored procedure and trigger?

1157


Does pdo prevent sql injection?

927


How do I find duplicates in sql?

929


Can we use ddl statements in stored procedure?

1140