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 are the sql versions?

965


How does join work in sql?

1021


What is the difference between sql and mysql?

1125


Is sql pronounced sequel or sql?

1279


Where is all the data on the internet stored?

1025


What is mdf ldf and ndf?

1007


What is compound trigger?

1045


how can we know the number of days between two given dates using mysql? : Sql dba

1051


What is record in pl sql?

1091


What is pl/sql table? Why is it used?

1054


How many types of triggers are there in pl sql?

1076


What are the types of dbms?

980


Can I call a procedure inside a function?

1018


Which join is like inner join?

1043


What is a trigger in sql?

1211