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...

You have one employee table having 3 entries emp_id, Mgr_id
and salary. Mgr_id is also referencing emp_id. so now find
out the emp_id which are having the second highest salary,
under a particular manager.

Answer Posted / chandra reddy

select empno,ename,deptno,sal from(select e.*,b.sal,rank()over(order by sal desc)send_h from em e join em1 b on e.empno=b.empno) where send_h=2

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are synonyms used for?

1044


What are the tools for Oracle ?

1072


What is an oracle user account?

1000


Explain a synonym?

1034


What is an index associated with a constraint?

1042


What is the usage of merge statement?

1156


What is a data dictionary and how can it be created?

1161


How a database is related to tablespaces?

1042


How does Oracle guarantee data integrity of data changes?

2405


What language does oracle use?

1116


What happens to the current transaction if the session is ended?

1100


What is a table index in oracle?

1135


How to invoke the data pump import utility?

1173


How to display row numbers with the records?

1087


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

1935