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

select empno from emp where (sal,deptno) in ( select max
(sal),deptno from emp where deptno in (10,20) group by
deptno)

Is This Answer Correct ?    13 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql and how does it work?

1122


Why do we use sql constraints? Which constraints we can use while creating database in sql?

998


How do you remove duplicate records from a table?

907


What is a string data type in sql?

994


What is pl sql code?

1006


what is 'mysqladmin' in mysql? : Sql dba

992


What is the main difference between sql and pl/sql?

1053


What is sql performance tuning?

884


What are stored procedures used for?

979


What is the process of debugging?

1027


What is rtm in testing?

1071


what is 'trigger' in sql? : Sql dba

1041


Is sql scripting language?

1013


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

1038


What is difference between sql function and stored procedure?

981