sys.col$ and sys.coltype$

create table T 
( 
  ID number, 
  COL1 SYS.XMLTYPE 
)XMLType COLUMN COL1 STORE AS CLOB;

select obj#,col#,intcol#,name,type# 
from sys.col$ 
where obj#='98134'
 OBJ#       COL#   INTCOL#        NAME            TYPE#
------     ----  ----------    -------           ------
 98134      1        1            ID                2
 98134      2        2           COL1              58
 98134      2        3       SYS_NC00003$         112


select obj#,col#,intcol#
from sys.coltype$
where obj#=98134
OBJ#      COL#      INTCOL#
------    ----    ----------
98134      2          2

COL$ is the data dictionary table for all columns. That is all the visible columns on the table plus the invisible columns. So the first query returns three rows for ID, COL1 and SYS_NC00003$. which is the offline storage for the XMLTYPE column (that's why COL# is the same and INTCOL# is different).

COLTYPE$ is the data dictionary table for columns declared as a complex data type. So COL$.TYPE#for COl1 is 58 ; this maps to a data type of ANYDATE or XMLTYPE, which are complex data types. The other two columns have data types of NUMBER ( COL$.TYPE# = 2) and CLOB ( COL$.TYPE# = 112) which are both Oracle "primitives". So that's why there's only one record in the query of COLTYPE$.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值