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 found sql?

898


How do you declare a user-defined exception?

965


What is a composite primary key?

1033


What are the two parts of design view?

975


What is pl sql block structure?

975


What are the different types of tables in sql?

931


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

1087


Can you have more than one trigger on a table?

942


What is sql key?

924


Is there a way to automate sql execution from the command-line, batch job or shell script?

919


When do we use triggers?

1028


What is not null in sql?

987


How do I audit the sql sent to the server?

958


What are all types of user defined functions?

1006


What is multiple columns?

1002