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 / kumar mrityunjay singh

SELECT *
FROM (SELECT EMPLOYEE_ID,MANAGER_ID,SALARY,DENSE_RANK() OVER(ORDER BY SALARY DESC)RN FROM EMPLOYEES WHERE MANAGER_ID='&ENTER_MANAGER_ID')WHERE RN < '&VALUE_UPTO'
/

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What privilege is needed for a user to create tables in oracle?

1001


How to start your 10g xe server from command line?

1134


How do I limit the number of rows returned by an oracle query after ordering?

1229


Why does oracle 9i treat an empty string as null?

1134


Give syntax for SQL and ORACLE joins.

1149


Can we create trigger on materialized view in oracle?

1047


What do you understand by a database object? Can you list a few of them?

1071


Explain how are indexes update?

1129


Explain the use of log option in exp command.

1194


How can windows applications connect to oracle servers?

1124


What is the difference between alert log file and tarce file ?

2240


What is transport network substrate (tns) in oracle?

1099


what are steps for interface? where is exchange rate defined in which table?

2246


How do I find the database name in oracle?

1090


How will you differentiate between varchar & varchar2?

1090