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

select * from em where sal in (select max(sal) from em
where dno in (10,20) group by dno) and dno in (10,20)

where em = table name
dno = department number
sal = salary

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why commit is not used in triggers?

1088


what is a stored procedure? : Sql dba

1192


What are the parameter modes supported by pl/sql?

1154


What is varchar sql?

1207


What is the limitation on the block size of pl/sql?

1038


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

1149


Which sorts rows in sql?

1057


Is join same as left join?

1083


Difference between table function and pipelined function?

1082


What is pl sql code?

1106


Can a select statement fire a trigger?

1209


Can two tables have same primary key?

1024


How does one use sql*loader to load images, sound clips and documents? : aql loader

1233


Can we insert data in view?

1009


Does sql use python?

1095