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

consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answer Posted / partha

Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 10 order by sal desc) a where
rownum < 2
union
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 20 order by sal desc) a where
rownum < 2

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints

1074


how to use like conditions? : Sql dba

1110


how to delete an existing column in a table? : Sql dba

1005


What are the methods of filing?

935


how to shutdown mysql server? : Sql dba

1103


How to add new employee details in an employee_details table with the following details

1091


List the different type of joins?

1061


Why are cursors used?

1122


Is it possible for a table to have more than one foreign key?

1030


Explain what is a column in a table?

1107


How to install oracle sql developer?

1046


What is not equal in sql?

1124


What is the use of triggers?

1038


what is online transaction processing (oltp)? : Sql dba

995


Which sql most popular?

991