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

i need department wise top 2 employees salary.which logic
i will use

Answer Posted / manish gupta

select deptno,sal from (select * from emp order by sal
desc) where rownum<3
union
select deptno,sal from (select * from emp order by sal
desc) where rownum<3 and deptno not in(20);


considering scott table in db.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does sql profiler affect performance?

1046


How long will it take to learn pl sql?

979


Explain unique key in sql.

1059


How do I save the results of sql query in a file?

1010


How delete all records from table in sql?

1014


What is the difference between instead of trigger and after trigger?

1066


What is delimiter in pl sql?

1098


what is the difference between rownum pseudo column and row_number() function? : Sql dba

1133


What is vector point function?

1094


how do you login to mysql using unix shell? : Sql dba

1125


what is error ora-03113: end-of-file on communication channel?

1226


What are the features of pl sql?

1110


What does the sign mean in sql?

1047


What is sharding in sql?

1039


Why do we need view in sql?

1036