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

Can we create a trigger on view?

882


Why do we use procedures?

941


How do you optimize a stored procedure in sql?

926


What are commit, rollback, and savepoint?

967


What is sql in oracle?

1045


What is partition in sql query?

983


What are sql data types?

999


what are the performance and scalability characteristics of mysql? : Sql dba

986


What is rtm stands for?

1079


What are the types of variable use in pl sql?

1056


How do I use google cloud in sql?

1069


How do I find duplicates in a single column in sql?

998


Is it possible to pass parameters to triggers?

1084


What are the different types of sql commands?

1109


What is form and report?

961