SELECT ROWNUM
, a.*
FROM EMP A
SELECT ROWNUM
, x.*
FROM ( SELECT a.* FROM EMP A ORDER BY A.ENAME) x
SELECT ROW_NUMBER() OVER(ORDER BY A.JOB, A.ENAME) ROW_NUM
, a.*
FROM EMP A ORDER BY A.JOB, A.ENAEM
SELECT ROW_NUMBER() OVER(PARTITION BY A.JOB, ORDER BY A.JOB, A.ENAME) ROW_NUM
, a.*
FROM EMP A ORDER BY A.JOB, A.ENAEM
예제 1.
SELECT ROWNUM
, a.*
FROM EMP A
예제 2.
SELECT ROWNUM
, x.*
FROM ( SELECT a.* FROM EMP A ORDER BY A.ENAME) x
예제 1.
SELECT ROW_NUMBER() OVER(ORDER BY A.JOB, A.ENAME) ROW_NUM
, a.*
FROM EMP A ORDER BY A.JOB, A.ENAEM
예제 1.
SELECT ROW_NUMBER() OVER(PARTITION BY A.JOB, ORDER BY A.JOB, A.ENAME) ROW_NUM
, a.*
FROM EMP A ORDER BY A.JOB, A.ENAEM
좋은 글 감사합니다.