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 rtm in testing?

1121


What is the life of an sql statement?

1024


What are the types of index in sql?

1071


what is the difference between nested subquery and correlated subquery?

1057


how can we optimize or increase the speed of a mysql select query? : Sql dba

948


What is dml statement?

961


What are the benefits of pl sql?

1122


what is bcp? When is it used?

1115


Could you please provide oca (oracle 10g) dumps for my certification ?

5170


How delete all records from table in sql?

980


What is the difference between Union and Union all. Which is faster.

1403


Why use triggers in sql?

961


How to rename a table?

1028


How do you optimize a stored procedure query?

1000


What are some predefined exceptions in pl/sql?

1171