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

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

Gautam

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you optimize a stored procedure query?

939


what is a record in a database ? : Sql dba

997


What does plv msg allows you to do?

1075


How much does sqlite cost?

986


Is subquery faster than join?

953


How do I add a database to sql?

1064


Can you sum a count in sql?

956


What are the indexing methods?

1003


What is date functions?

964


what is primary key? : Sql dba

956


Does sql require a server?

944


How to place comments in pl/sql?

1099


How do sql triggers work?

989


how do you know the version of your mysql server? : Sql dba

937


How to use sql statements in pl/sql?

1055