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

select ename from table where sal in
(select max(sal) from table_name
where deptno in ('10','20')
group by deptno);

Is This Answer Correct ?    16 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of double ampersand (&&) in sql queries? Give an example

1122


How can get second highest salary in sql?

965


What sql does db2 use?

963


what are sequences

1722


What is java sql driver?

1092


What is prepared statement in sql?

1036


What is the difference between function and procedure in pl/sql?

1057


What does where 1 1 mean in sql?

1019


What is clause in sql?

1093


How do I count rows in sql?

982


What is dbo in sql?

941


What is the difference between jpql and sql?

1074


Define overloaded procedure?

1059


what is 'mysqld'? : Sql dba

959


What is record type in pl sql?

977