数据字典视图的查询


数据字典视图的查询




SQL> desc dictionary 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TABLE_NAME                                         VARCHAR2(30)
 COMMENTS                                           VARCHAR2(4000)


SQL> desc v$fixed_table
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 NAME                                               VARCHAR2(30)
 OBJECT_ID                                          NUMBER
 TYPE                                               VARCHAR2(5)
 TABLE_NUM                                          NUMBER


select * from dictionary; 

select * from v$fixed_table; 可以查询所有的数据字典(视图)

dictionary 含有一列comments 注释,

通过where 条件过滤table_name 项,

如,select * from dictionary where table_name like '%INDEX%';


SQL> col table_name for a30
SQL> col comments for a50
SQL> set line 200
SQL> select * from dictionary where table_name like '%INDEX%';


TABLE_NAME                     COMMENTS
------------------------------ --------------------------------------------------
DBA_INDEXES                    Description for all indexes in the database
DBA_INDEXTYPES                 All indextypes
DBA_INDEXTYPE_ARRAYTYPES       All array types specified by the indextype
DBA_INDEXTYPE_COMMENTS         Comments for user-defined indextypes
DBA_INDEXTYPE_OPERATORS        All indextype operators
DBA_PART_INDEXES
DBA_XML_INDEXES                Description of all XML indexes in the database
USER_INDEXES                   Description of the user's own indexes
USER_INDEXTYPES                All user indextypes
USER_INDEXTYPE_ARRAYTYPES      All array types specified by the indextype
USER_INDEXTYPE_COMMENTS        Comments for user-defined indextypes


TABLE_NAME                     COMMENTS
------------------------------ --------------------------------------------------
USER_INDEXTYPE_OPERATORS       All user indextype operators
USER_PART_INDEXES
USER_XML_INDEXES               Description of the user's own XMLType indexes
ALL_INDEXES                    Descriptions of indexes on tables accessible to th
                               e user


ALL_INDEXTYPES                 All indextypes available to the user
ALL_INDEXTYPE_ARRAYTYPES       All array types specified by the indextype
ALL_INDEXTYPE_COMMENTS         Comments for user-defined indextypes
ALL_INDEXTYPE_OPERATORS        All operators available to the user
ALL_PART_INDEXES


TABLE_NAME                     COMMENTS
------------------------------ --------------------------------------------------
ALL_XML_INDEXES                Description of the all XMLType indexes that the us
                               er has privileges on


INDEX_HISTOGRAM                statistics on keys with repeat count
INDEX_STATS                    statistics on the b-tree
GV$INDEXED_FIXED_COLUMN        Synonym for GV_$INDEXED_FIXED_COLUMN
V$INDEXED_FIXED_COLUMN         Synonym for V_$INDEXED_FIXED_COLUMN


25 rows selected.




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值