Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view all tables and fields in Oracle

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report