DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) : DBMS_ROWID « PL SQL Programming « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » PL SQL Programming » DBMS_ROWID 
24. 24. 1. DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
SQL> set echo on
SQL>
SQL>
SQL>
SQL>
SQL> create table t
  2  a int,
  3    b varchar2(4000default rpad('*',4000,'*'),
  4    c varchar2(3000default rpad('*',3000,'*' )
  5  )
  6  /

Table created.

SQL>
SQL> insert into t (avalues 1);

row created.

SQL> insert into t (avalues 2);

row created.

SQL> insert into t (avalues 3);

row created.

SQL> delete from where a = ;

row deleted.

SQL> insert into t (avalues 4);

row created.

SQL> select from t;


         A
----------
         1
         4
         3

rows selected.

SQL>
SQL> -- example showing the above sort of effect without a delete
SQL>
SQL>
SQL> insert into t(aselect rownum from all_users;

17 rows created.

SQL> commit;

Commit complete.

SQL> update t set b = null, c = null;

20 rows updated.

SQL> set serveroutput on
SQL> commit;

Commit complete.

SQL>
SQL> insert into t(aselect rownum+1000 from all_users;

17 rows created.

SQL> select dbms_rowid.rowid_block_number(rowid), a from t;


DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)          A
------------------------------------ ----------
                               42610          1
                               42611          4
                               42612          3
                               42613          1
                               42613       1017
                               42614          2
                               42614       1016
                               42615          3
                               42615       1015
                               42616          4
                               42616       1014
                               43785          5
                               43785       1013
                               43786          6
                               43786       1012
                               43787          7
                               43787       1011
                               43788          8
                               43788       1010
                               43789          9
                               43789       1009
                               43790         10
                               43790       1008
                               43791         11
                               43791       1007
                               43792         12
                               43792       1006
                               43793         13
                               43793       1005
                               43794         14
                               43794       1004
                               43795         15
                               43795       1003
                               43796         16
                               43796       1002
                               43797         17
                               43797       1001

37 rows selected.

SQL> drop table t;

Table dropped.

SQL>
24. 24. DBMS_ROWID
24. 24. 1. DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.