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

What found sql?

947


What is difference between nchar and nvarchar?

1035


What is package in pl sql?

1030


How to place comments in pl/sql?

1169


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

986


what is a join? : Sql dba

1042


What is the difference between nested table and varray?

1014


What is the difference between having and a where in sql?

1112


How does stored procedure reduce network traffic?

1014


What are different types of sql?

1196


How do you write an index?

975


Which are the different case manipulation functions in sql?

1032


What are the parameter modes supported by pl/sql?

1115


What are the different type of joins in sql?

957


How do you copy a table in sql?

1076