728x90
select * from ( select rownum as rn, e.* from (select * from emp order by empno desc) e )
where rn between 1 and 300;
결과값 >
RN EMPNO ENAME JOB MGR
---------- ---------- -------------------- ------------------ ----------
HIREDATE SAL COMM DEPTNO JUMIN
-------- ---------- ---------- ---------- --------------------------
1 7788 scott kkk 7902
09/02/24 3000 30
2 7782 clark kkk 7902
09/02/24 3000 20
3 7698 martin kkk 7902
09/02/24 2450 1400 20
RN EMPNO ENAME JOB MGR
---------- ---------- -------------------- ------------------ ----------
HIREDATE SAL COMM DEPTNO JUMIN
-------- ---------- ---------- ---------- --------------------------
4 7654 jones kkk 7902
09/02/24 3000 30
5 7566 ward kkk 7902
09/02/24 1250 500 20
'Engineering > DB' 카테고리의 다른 글
MSSQL 2005 관리자 강좌_3일차 (0) | 2010.12.02 |
---|---|
MSSQL 2005 관리자 강좌_2일차 (0) | 2010.12.02 |
MSSQL 2005 관리자 강좌_1일차 (0) | 2010.12.02 |
select* from 테이블, select *from 테이블 (0) | 2010.06.11 |
oracle 에서 date 를 unixtimestamp 로 변경 (0) | 2010.06.09 |