1. Get the table:
select table_name from user_tables; //当前用户拥有的表select table_name from all_tables; //所有用户的表select table_name from dba_tables; //包括系统表select table_name from dba_tables where owner=‘用户名‘ALL_OBJECTS describes all objects accessible to the current user. 描述当前用户有访问权限的所有对象 DBA_OBJECTS describes all objects in the database. 描述了数据库中的所有对象 USER_OBJECTS describes all objects owned by the current user. 描述了当前用户所拥有的所有对象
User_tables: Table_name,tablespace_name,last_analyzed, etc.
dba_tables:ower,table_name,tablespace_name,last_analyzed, etc.
all_tables:ower,table_name,tablespace_name,last_analyzed, etc.
all_objects:ower,object_name,subobject_name,object_id,created,last_ddl_time,timestamp,status, etc.
2. Get table field:
SELECT * from user_tab_columns where table_name= ' user table ';
SELECT * from all_tab_columns where table_name= ' user table ';
SELECT * from dba_tab_columns where table_name= ' user table ';
3. Get the Table notes:
user_tab_comments;表注释select * from user_tab_commentsuser_tab_comments:table_name,table_type,comments相应的还有dba_tab_comments,all_tab_comments,这两个比user_tab_comments多了ower列。
4. Get field Comments:
select * from user_col_commentsuser_col_comments:table_name,column_name,comments相应的还有dba_col_comments,all_col_comments,这两个比user_col_comments多了ower列。user_col_comments;表字段注释(列注释)USER_COL_COMMENTS 视图显示已经为表中的列输入的注释。这些注释通过comment命令添加到数据库中。USER_COL_COMMENTS 视图包含3 列:Table_Name 表名或视图名Column_Name 列名Comments 已经为该列输入的注释
5, Check table field Comment Case:
查看JH表中字段的注释:select table_name,column_name,comments from user_col_comments where table_name=‘JH‘;TABLE_NAME COLUMN_NAME COMMENTS-------------------------- --------------------------- -----------------------JH CONTACT_NAME 联系人姓名
View all tables and fields and table comments in the Oracle database. Field comments