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

How do you optimize a stored procedure in sql?

916


what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba

1110


How to download oracle sql developer?

1075


What is the purpose of the primary key?

1032


Which one is better sql or oracle?

927


Can you sum a count in sql?

974


What are the packages in pl sql?

989


Why join is faster than subquery?

1069


How do I run sql?

1123


What is oracle pl sql developer?

946


What is denormalization in a database?

1013


How to make a copy values from one column to another in sql?

1007


How can you load multi line records? : aql loader

1042


How many types of keys are there in sql?

1016


what is primary key? : Sql dba

981