1.
select
dbms_rowid.rowid_object(rowid) object_id,
dbms_rowid.rowid_relative_fno(rowid) file_id,
dbms_rowid.rowid_block_number(rowid) block_id ,
dbms_rowid.rowid_row_number(rowid) num
from westemp
where rownum<5;
-------
2.
create or replace function west_get_rowid(l_rowid in varchar2) return varchar2 is
ls_my_rowid varchar2(200);
rowid_type number;
object_number number;
relative_fno number;
block_number number;
row_number number;
begin dbms_rowid.rowid_info(l_rowid,rowid_type,object_number,relative_fno, block_number, row_number);
ls_my_rowid := 'Object# is :'||to_char(object_number)||chr(10)||'Relative_fno is :'||to_char(relative_fno)||chr(10)||'Block number is :'||to_char(block_number)||chr(10)||'Row number is :'||to_char(row_number);
return ls_my_rowid ;
end;
----
select west_get_rowid(rowid) name from westemp;