Get the block number through the ROWID value, the function of the file number is ____ function

Source: Internet
Author: User
Create or Replace function Get_rowid
/*
Function: Implement ROWID in Oracle into the corresponding blocks in the database, column number
*/
(L_rowid in VARCHAR2)--Input rowID
return VARCHAR2
Is
Ls_my_rowid VARCHAR2 (200);
Rowid_type number;
Object_number number;
RELATIVE_FNO number;
Block_number number;
Row_number number;


Begin
--Parse with Oracle custom packages to get the appropriate value
Dbms_rowid.rowid_info (L_rowid,rowid_type,object_number,relative_fno, Block_number, row_number);
--store the corresponding values in the variable
Ls_my_rowid: = ' data Object number: ' | | To_char (object_number) | | Chr (10) | |
' Data file Number: ' | | To_char (RELATIVE_FNO) | | Chr (10) | |
' The number of blocks in the data file: ' | | To_char (block_number) | | Chr (10) | |
' Number of rows in block: ' | | To_char (Row_number);
return ls_my_rowid;
End
/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.