前缀 |
说明 |
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:
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;
DESCRIBE user_synonyms
SELECT*
FROM user_synonyms;
COMMENTON TABLE employees
IS ‘Employee Information‘;
Commentcreated.
原文地址:http://blog.csdn.net/qhwc2009/article/details/46341601