前綴
說明
USER
用戶自己的
ALL
用戶可以訪問到的
DBA
管理員視圖
V$
性能相關的數據
從DICTIONARY開始,這個數據對象包含了數據字典的表名和說明
DESCRIBE DICTIONARY
SELECT*
FROM dictionary
WHERE table_name= 'USER_OBJECTS';
USER_OBJECTS視圖:
SELECTobject_name,object_type,created, status
FROM user_objects
ORDERBY object_type;
ALL_OBJECTS:
?可以通過查詢ALL_OBJECTS來確定當前用戶能訪問的數據對象USER_TABLES 用戶自己的表:
DESCRIBE user_tables
SELECTtable_name
FROM user_tables;
DESCRIBEuser_tab_columns
SELECT column_name,data_type,data_length,
data_precision,data_scale,nullable
FROM user_tab_columns
WHERE table_name= 'EMPLOYEES';
DESCRIBE user_constraints
SELECT constraint_name,constraint_type,
search_condition,r_constraint_name,
delete_rule,status
FROM user_constraints
WHERE table_name= 'EMPLOYEES';
DESCRIBE user_cons_columns
SELECT constraint_name,column_name
FROM user_cons_columns
WHERE table_name= 'EMPLOYEES';
DESCRIBE user_views
SELECTDISTINCT view_nameFROM user_views;
SELECT text FROM user_views
WHERE view_name= 'EMP_DETAILS_VIEW';
DESCRIBE user_sequences
SELECT sequence_name,min_value,max_value,
increment_by,last_number
FROM user_sequences;
LAST_NUMBER表示當沒有使用NOCAHCE時,下一個可用的值
DESCRIBE user_synonyms
SELECT*
FROM user_synonyms;
COMMENTON TABLE employees
IS 'Employee Information';
Commentcreated.
注釋相關的視圖: ALL_COL_COMMENTS USER_COL_COMMENTS ALL_TAB_COMMENTS USER_TAB_COMMENTS