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

How will you identify oracle database software release?

1010


What is a cursor in oracle?

1172


Explain the use of indexes option in exp command.

1149


How to write date and time literals in oracle?

1002


How to convert a string to a date in oracle database?

1053


What is the string concatenation operator in oracle?

1177


In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?

2286


How to speed up webrick?

1076


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2970


What is oracle used for?

1026


How to use existing values in update statements using oracle?

1067


A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.

5551


How to list all indexes in your schema?

1093


What are the common oracle dba tasks?

1147


What is the exact use of Collections?

2143