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

Why should I use postgresql?

998


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1073


Explian rowid, rownum? What are the psoducolumns we have?

984


Explain the working of primary key?

1073


Is join same as left join?

1020


define sql update statement ? : Sql dba

1099


What are conditional predicates?

1031


how would you enter characters as hex numbers? : Sql dba

968


How do sql databases work?

979


How would you reference column values before and after you have inserted and deleted triggers?

1047


What is a memo field?

945


How does sql profiler work?

996


Does sql require a server?

994


What is server name sql?

1121


How do I create a memory optimized filegroup?

943