Oracle D2K Question:
Download Job Interview Questions and Answers PDF
How to get / select the nth row from the table?
how to select first n rows ,last n rows from a table?
Answer:
nth salary
select salary
from table_name a
where &n=(select count(salary) from table_name b where a.salary<=b.salary);
n salaries
select salary
from table_name a
where &n>=(select count(salary) from table_name b where a.salary<=b.salary);
select level,max(column name) from emp where level = n connect by prior sal > sal group by level;
select salary
from table_name a
where &n=(select count(salary) from table_name b where a.salary<=b.salary);
n salaries
select salary
from table_name a
where &n>=(select count(salary) from table_name b where a.salary<=b.salary);
select level,max(column name) from emp where level = n connect by prior sal > sal group by level;
Download Oracle D2K Interview Questions And Answers
PDF
Previous Question | Next Question |
How do you run ms_batch file in forms? what could be the value :system.mode? | Do you know what is APPLYSYS in Oracle application database schema, what is APPS? |