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

What are the basic techniques of indexing?

1012


what is acid property in database? : Sql dba

960


What is the plv (pl/vision) package offers?

981


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

994


Can we write ddl statements in functions?

1051


Differentiate between syntax and runtime errors.

1119


Are sql database names case sensitive?

935


Why do we use set serveroutput on?

922


Explain the working of foreign key?

976


What mean sql?

951


what is self join and what is the requirement of self join? : Sql dba

1076


What is null in pl/sql?

1022


What operating systems are supported by oracle sql developer?

903


what are the join types in tsql? : Transact sql

981


Mention what does the hierarchical profiler does?

1021