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 query cache in mysql? : Sql dba

993


Which is faster view or stored procedure?

889


Can we call stored procedure in function?

905


What are the two types of exceptions in pl/sql?

968


How to start the command-line sql*plus?

1001


what are the types of join and explain each? : Sql dba

991


Does truncate require commit?

921


Is hadoop a nosql?

950


What is the maximum number of rows in sql table?

957


What is a field in a database?

1006


What is embedded sql in db2?

962


How to run sql commands in sql*plus?

1081


What is the use of index in hive?

963


What is not null in sql?

987


Can you join a table to itself?

1033