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

SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=10)
UNION
(SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=20))

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why use triggers in sql?

1011


what does the t-sql command ident_incr does? : Transact sql

1125


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

1076


How to get help at the sql prompt?

1163


Where is pl sql used?

1003


How many functions are there in sql?

1094


What is compilation error in pl sql?

1024


explain the difference between delete , truncate and drop commands? : Sql dba

1146


Explain what is a view?

1115


What is cascade in sql?

1016


How does stored procedure reduce network traffic?

1064


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1172


What is the best sql course?

1026


How do temporal tables work?

1018


what is try_catch block in procedure

1808