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

WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?

2252


How can I combine multiple rows into a comma-delimited list in oracle?

1001


Explain constraining triggers.

1045


Explain what does a control file contain?

1034


How can I create database in oracle?

961


Explain the use of full option in exp command.

1057


Explain the use of constraints option in exp command.

994


What's dateware house and what's clustor with practicle example

2129


What are group functions in oracle?

979


Difference between varchar and varchar2 data types?

1120


What are the varoius components of physical database structure of oracle database?

946


How to build data dictionary view an new database?

960


How to get execution statistics reports on query statements?

1009


How to use attributes of the implicit cursor in oracle?

951


How to resolve the ORA-39133 error in Oracle?

1036