Get the App
SLTechnology News&Howtos  ›  Database  › 

How to view all tables and fields in Oracle

Shulou Source: shulou.com Published: 2022-05-31 19:09:00 11月12日 Update

This article is to share with you about how to view all the tables and fields in Oracle. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.

Get tabl

# the table owned by the current user select table_name from user_tables; # the table select table_name from all_tables; # for all users, including the system table select table_name from dba_tables; select table_name from dba_tables where owner=' user name'# describes all the objects ALL_OBJECTS describes all objects accessible to the current user that the current user has access to. # describes all the objects in the database DBA_OBJECTS describes all objects in the database. # describes all the objects owned by the current user, USER_OBJECTS describes all objects owned by the current user.

User_tables:TABLE_NAME,TABLESPACE_NAME,LAST_ANALYZED et al.

Dba_tables:ower,table_name,tablespace_name,last_analyzed et al.

All_tables:ower,table_name,tablespace_name,last_analyzed et al.

All_objects:ower,object_name,subobject_name,object_id,created,last_ddl_time,timestamp,status et al.

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'

Get table comments

User_tab_comments; Table Notes select * from user_tab_comments

User_tab_comments:table_name,table_type,comments .

There is also dba_tab_comments,all_tab_comments, which has more ower columns than user_tab_comments.

Get field comments

Select * from user_col_comments user_col_comments:table_name,column_name,comments

There is also dba_col_comments,all_col_comments, which has more ower columns than user_col_comments.

User_col_comments; table field comments (column comments)

The user_col_comments view shows the comments that have been entered for the columns in the table. These comments are added to the database through the comment command. The user_col_comments view contains 3 columns:

Table_Name table or view name

Column_Name column name

Comments that Comments has entered for this column

This is how to view all the tables and fields in Oracle. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Comments users fields objects user tables two data database more knowledge articles views input utility commands graphic names that is work meetings articles permissions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Xiaomi vpn Redmi