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

Select emp_name from emp where sal =(Select Max(sal) from
emp where deptno=10) and deptno=10 union
Select emp_name from emp where sal =(Select Max(sal) from
emp where deptno=20)and deptno=20

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lexical units in pl sql?

1206


How to make a copy values from one column to another in sql?

1080


What does bitemporal mean?

1113


Explain the purpose of %type and %rowtype data types?

975


What is primary and foreign key?

1122


What is a procedure in pl sql?

1286


Can delete statement be rollbacked?

1031


What is rownum in sql?

1092


Can we use joins in subquery?

1223


When are we going to use truncate and delete?

1022


What is the difference between local variables and global variables?

1174


What is sql clause?

1092


what is a join? : Sql dba

1083


Why is a trigger used?

991


How many types of sql are there?

1045