How to get all the datatypes information in oracle schema.
Whole datatypes with all details like name type pression etc.
Assuming you have the correct access, this should do it..
select distinct data_type,data_length,data_precision,data_scale
from all_tab_columns
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.