1. Queris for Nth maximum Nth row? 2. In One table there are 5 fields. empno, ename, deptcd, managr_id, salary. Select the departments whoose sum of the salary greater than the sum of salaries of any department? 3. When index will be usd in the Query?
Total Answers and Comments: 7
Last Update: August 13, 2009 Asked by: DEBPROSAD BANERJEE
RE: 1. Queris for Nth maximum Nth row?2. In One ...
1. Queris for Nth maximum Nth row?
Select * from (select column_name1 column_name1 from table_name order by column_name) where rownum < N
2. In One table there are 5 fields. empno ename deptcd managr_id salary. Select the departments whoose sum of the salary greater than the sum of salaries of any department?
Select deptcd sum(salary) from table_name group by deptcd orderby salary desc
3. When index will be usd in the Query? Index is used by the Optimizer when a query is fired in Oracle.
RE: 1. Queris for Nth maximum Nth row?2. In One table there are 5 fields. empno, ename, deptcd, managr_id, salary.Select the departments whoose sum of the salary greater than the sum of salaries of any department?3. When index will be usd in the Query?
RE: 1. Queris for Nth maximum Nth row?2. In One table there are 5 fields. empno ename deptcd managr_id salary.Select the departments whoose sum of the salary greater than the sum of salaries of any department?3. When index will be usd in the Query?*))select department max(sum(salary)) from table_name group by department *) Function based index will be used for the above querry.