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

Common commands for viewing table structure in Oracle

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly explains "Oracle commonly used to view table structure commands", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn the "Oracle commonly used to view table structure commands" it!

Oracle common view table structure commands

Get the table:

Select table_name from user_tables; / / current user's table

Select table_name from all_tables; / / tables for all users

Select table_name from dba_tables; / / including system tables

Select table_name from dba_tables where owner=' user name'

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 fields:

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'

User_tab_columns:

Table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id et al.

All_tab_columns:

Ower,table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id et al.

Dba_tab_columns:

Ower,table_name,column_name,data_type,data_length,data_precision,data_scale,nullable,column_id et al.

Get table comments:

Select * from user_tab_comments

User_tab_comments:table_name,table_type,comments

Accordingly, there are dba_tab_comments,all_tab_comments, which have more ower columns than user_tab_comments.

Get field comments:

Select * from user_col_comments

User_col_comments:table_name,column_name,comments

At this point, I believe that everyone on the "Oracle commonly used to view table structure commands" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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