dbms_rowid.rowid_block_number(rowid) and ora_rowscn : dbms_rowid « System Packages « Oracle PL / SQL






dbms_rowid.rowid_block_number(rowid) and ora_rowscn

 

SQL>
SQL> CREATE TABLE DEPT(
  2      DEPTNO NUMBER(2),
  3      DNAME VARCHAR2(14),
  4      LOC VARCHAR2(13)
  5  );

Table created.

SQL>
SQL> INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK');

1 row created.

SQL> INSERT INTO DEPT VALUES (20, 'RESEARCH', 'DALLAS');

1 row created.

SQL> INSERT INTO DEPT VALUES (30, 'SALES', 'CHICAGO');

1 row created.

SQL> INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON');

1 row created.

SQL>
SQL>
SQL>
SQL> update dept
  2     set dname = lower(dname)
  3   where deptno = 10;

1 row updated.

SQL>
SQL> select deptno, dname,
  2         dbms_rowid.rowid_block_number(rowid) blockno,ora_rowscn
  3    from dept;

    DEPTNO DNAME             BLOCKNO ORA_ROWSCN
---------- -------------- ---------- ----------
        10 accounting          42706    1295679
        20 RESEARCH            42706    1295679
        30 SALES               42706    1295679
        40 OPERATIONS          42706    1295679

SQL> drop table dept;

Table dropped.

SQL>

   
  








Related examples in the same category

1.DBMS_ROWID.ROWID_BLOCK_NUMBER(RowID)
2.DBMS_ROWID.ROWID_RELATIVE_FNO(RowID)
3.DBMS_ROWID.ROWID_RELATIVE_FNO(RowID),DBMS_ROWID.ROWID_BLOCK_NUMBER(RowID)
4.DBMS_ROWID.ROWID_ROW_NUMBER(RowID)
5.DBMS_ROWID.ROWID_TO_RESTRICTED(RowID,0)
6.where rowid = dbms_rowid.rowid_create(1,49627,7,138,0)