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

select * from em where sal in (select max(sal) from em
where dno in (10,20) group by dno) and dno in (10,20)

where em = table name
dno = department number
sal = salary

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find duplicates in sql?

915


Is sqlite thread safe?

1030


What does dml mean?

963


How do I create a sql script?

1085


Can dml statements be used in pl/sql?

1060


What is procedure and function in sql?

971


What is audit logout in sql profiler?

1005


Is it mandatory for the primary key to be given a value when a new record is inserted?

1185


Explain the types of joins in sql?

1014


how do you login to mysql using unix shell? : Sql dba

1068


What is a heap in sql?

1045


How do I send sql query results to excel?

1048


What is embedded sql with example?

1018


What are three advantages to using sql?

993


What is constant in pl sql?

1005