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

Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 10 order by sal desc) a where
rownum < 2
union
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 20 order by sal desc) a where
rownum < 2

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

1116


What is the purpose of the primary key?

1010


What is procedure and function?

929


What is sql engine in oracle?

931


How many primary keys can a table have?

955


Is id a reserved word in sql?

1095


which types of join is used in sql widely? : Sql dba

931


What is a temp table?

953


What are crud methods?

971


Can you call pl/sql package functions from within a fast formula?

979


Are left and right joins the same?

1003


How are functions and procedures called in PL/SQL?

1132


What is the difference between functions, procedures, and packages in pl/sql?

977


Is left join inner or outer?

964


What are the operators in sql?

975