How To Find Datatypes information in oracle schema?

前端 未结 2 1062
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 08:35

How to get all the datatypes information in oracle schema.

Whole datatypes with all details like name type pression etc.

相关标签:
2条回答
  • 2020-12-22 09:04

    Assuming you have the correct access, this should do it..

    select distinct data_type,data_length,data_precision,data_scale 
    from all_tab_columns
    
    0 讨论(0)
  • 2020-12-22 09:13

    Oracle has an internal Data Dictionary with meta data about the database:

    One of the most important parts of an Oracle database is its data dictionary, which is a read-only set of tables that provides information about the database. A data dictionary contains:

    • The definitions of all schema objects in the database (tables, views, indexes, clusters, synonyms, sequences, procedures, functions, packages, triggers, and so on)
    • How much space has been allocated for, and is currently used by, the schema objects
    • Default values for columns
    • Integrity constraint information
    • The names of Oracle users
    • Privileges and roles each user has been granted
    • Auditing information, such as who has accessed or updated various schema objects
    • Other general database information The data dictionary is structured in tables and views, just like other database data

    One of the tables is ALL_TAB_COLS, which has data about the columns of the tables, their data type prevision etc.

    You can do a distinct select on the DATA_TYPE column of the table to find the data types currently in use.

    List of all data dictionary views here.

    PS: The fact that some data type is not used today does not mean that it will not be used in the future. You may want to either use all the data types, or query ALL_TAB_COLS frequently, depending on your requirement.

    0 讨论(0)
提交回复
热议问题