View All Tables and fields and Table comments. Field comments in Oracle

Source: Internet
Author: User

View All Tables and fields and Table comments. Field comments in Oracle

View All Tables and fields and Table comments. Field comments in Oracle

Get table:

Select table_name from user_tables; // The table owned by the current user
 
Select table_name from all_tables; // tables of all users
Select table_name from dba_tables; // includes the system table
Select table_name from dba_tables where owner = 'username'
 
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.

Obtain 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, etc.
All_tab_columns:
Ower, table_name, column_name, data_type, data_length, data_precision, data_scale, nullable, column_id, etc.
Dba_tab_columns:
Ower, table_name, column_name, data_type, data_length, data_precision, data_scale, nullable, column_id, etc.

Get table comments:

Select * from user_tab_comments
User_tab_comments: table_name, table_type, comments
There are also dba_tab_comments and all_tab_comments, which have more ower columns than user_tab_comments.
Obtain field comments:
Select * from user_col_comments
User_col_comments: table_name, column_name, comments

There are also dba_col_comments and all_col_comments, which have more ower columns than user_col_comments.

--------------------------------------------------------------------------------

Installing Oracle 12C in Linux-6-64

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

--------------------------------------------------------------------------------

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.