数据字典视图的查询
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.