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

Is a secondary key the same as a foreign key?

1046


What is cold data?

966


What is the difference between delete and truncate statement in sql?

1079


How do I view a view in sql?

956


How do you explain an index?

1287


What are the types of optimization?

965


what is 'mysqlcheck'? : Sql dba

1019


What does the sign mean in sql?

1000


What is the advantage of index in sql?

975


how to get help information from the server? : Sql dba

949


Can we join 3 tables in sql?

1053


What are the events on which a database trigger can be based?

1198


What is group function in sql?

1028


What are basic techniques of indexing?

1391


How to use boolean type in select statement?

1085