DBILITY

ROWID 구조 본문

database/oracle

ROWID 구조

DBILITY 2018. 3. 22. 10:25
반응형
 버전  자리수  형식
7  8 byte ( 4 - 2 - 2 )  1~4 block number
 5~6 row number

 7~8 file number
8  10 byte ( 4 -1.5 -2.5 - 2 )  1~4 data object id
 5~half 6 file number
 half 6~8 block number
 9~ 10 rownumber
   18 byte ( 6 - 3 - 6 - 3 )  1~6 data object id
 7~9 file number
 10~15 block number
 16~18 row number

 

11g

SELECT
    ROWID AS "ROW_ID",
    DBMS_ROWID.ROWID_OBJECT(rowid) "OBJECT",
    DBMS_ROWID.ROWID_RELATIVE_FNO(rowid) "FILE",
    DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid) "BLOCK",
    DBMS_ROWID.ROWID_ROW_NUMBER(rowid) "ROW"
FROM
    DUAL

 

반응형
Comments