Oracle pseudo column RowID

ROWID stores the address of the row in the database, and it uses ROWIDs to construct index. But you can also use rowid to see how a table is organized. This part is often missed by many people.
 
Oracle has two type of ROWID:
Extended ROWID: Extendeds RowID use base 64 encoding and have the following components:
  data object number: identify the database segment of the object containing the required row
  relative file number: identify which data file in the segment contained the required row
  block number: identify which block in the data file contained the required row
  row number: slot number of the row in the block
Restricted ROWID: Restricted ROWID use a binary representation and contain the following components:
  Block number
  Row number
  file number
 Oracle provides a package to parse the rowid. - dbms_rowid. it has the function like:
    - The result of this function can be used to link to dba_data_files to get file name.
 
 The package also has many other function and procedure to process the ROWID data type.
 
 So we can get more detail about how data are stored in a table.
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值