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 / rashmi_raju

SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=10)
UNION
(SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=20))

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is database white box testing and black box testing?

1095


What is the difference between a procedure and a function?

1084


What are commit, rollback, and savepoint?

966


What is sql profiler in oracle?

1070


how to start mysql server? : Sql dba

1182


Is delete faster than truncate?

994


Why do we need databases?

1023


How do you know if a relationship is 2nf?

926


What is the difference between the conventional and direct path loader? : aql loader

1142


How do I quit sql?

935


How does postgresql compare to oracle/db2/ms sql server/informix?

1017


What is coalesce sql?

977


how can you create an empty table from an existing table? : Sql dba

1135


What does the hierarchical profiler does?

1048


Which is better join or inner query?

1019