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

How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

1442


What are the qualities of 2nf?

1046


How do I pipe the output of one isql to another?

1010


What is orm in sql?

1052


What is the difference between the implicit and explicit cursors?

1059


What is hibernate and its relation to sql?

1131


What does select count (*) mean in sql?

1025


what is union? : Sql dba

1034


What are the two characteristics of a primary key?

993


what is a field in a database ? : Sql dba

1071


What is dbo in sql?

977


What is the use of index in hive?

1007


what are the advantages and disadvantages of cascading style sheets? : Sql dba

1065


What is a rank in sql?

970


What is sqlcontext?

1091