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

View all tables and fields in Oracle

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

Share

Shulou(Shulou.com)06/01 Report--

Get table fields:

Select *

From user_tab_columns

Where Table_Name=' user Table'

Order by column_name

Get table comments:

Select *

From user_tab_comments

Where Table_Name=' user Table'

Order by Table_Name

Get field comments:

Select *

From user_col_comments

Where Table_Name=' user Table'

Order by column_name

/ * 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='zfxfzb'

/ *

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 the 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'

/ * 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

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

, /

/ * get field notes: * /

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.

, /

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