Orale common table organization operation commands

Source: Internet
Author: User

Select * from USER_TAB_COLUMNS to retrieve the table structures of all tables supported by this rule (detailed information of each column)

Field tablename, column_name, data_type, data_length, nullable (null), column_id (the order of the field in the table), default_length, data_defaul, char_length (the length of the struct variable)
Select * from USER_CATALOG to retrieve the table_name and table_type fields of TABLE, VIEW, and SEQUENCE (where table_type = 'table ').
Select * from USER_COL_COMMENTS: Field tablename, column_name, comments

Select * from USER_TABLES query table information (physical)
Select * from USER_VIEWS Retrieval Attempt (physical)
Select * from USER_TAB_COMMENTS field table_name, table_type, comments table and view description
SELECT * FROM USER_ARGUMENTS
Field name object_name, packge_name, objectid,... argument_name, position, data_type, default_value, in_out, data_length (type length, data is null, VARCHAR2 is length, NUMBER is 22)
Data_type: ref cursor is the CURSOR VARCHAR2. NUMBER

Retrieve primary key and foreign key information
SELECT. constraint_name,. constraint_type,. table_name, B. column_name, c. table_name, c. column_name FROM USER_CONSTRAINTS a, USER_CONS_COLUMNS B, USER_CONS_COLUMNS c WHERE (. constraint_name = B. constraint_name AND (. constraint_type = 'P' OR. constraint_type = 'R') AND. r_constraint_name = c. constraint_name (+)

 

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.