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

Which sql most popular?

938


Can we use view in stored procedure?

865


What does subquery mean in sql?

993


What is restrict in sql?

1035


What is difference between function and trigger?

972


What is case function?

989


How many functions are there in sql?

964


how are mysql timestamps seen to a user? : Sql dba

1052


Can we use joins in subquery?

1089


how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

1300


Does inner join remove duplicates?

888


How do I pipe the output of one isql to another?

945


What is trigger price?

926


Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.

956


What are inner outer left and right joins in sql?

965