Interview Questions

Display the records between two range

DATABASE Administrator (DBA) Interview Questions and Answers


(Continued from previous question...)

59. Display the records between two range

select rownum, empno, ename from emp where rowid in
(select rowid from emp where rownum <=&upto minus
select rowid from emp where rownum<&Start);
Enter value for upto: 10
Enter value for Start: 7
ROWNUM EMPNO ENAME
--------- --------- ----------
1 7782 CLARK
2 7788 SCOTT
3 7839 KING
4 7844 TURNER

(Continued on next question...)

Other Interview Questions