List all used data types of a table or whole database in Oracle DB
-
26-12-2020 - |
Question
I am preparing a migration from Oracle DB to a SQLite DB. I would like to know all used datatypes in the Oracle DB so I can check out the equal datatypes in SQLite.
I am sure using Information_Schema seems to be the right way but I don't know how to start.
The used version of the Oracle DB is 10g (10.2).
I am thanking in advance.
Solution
Here is an example to find the number and type of columns in a schema:
select data_type, count(*) from dba_tab_cols
where owner = '...' group by data_type order by data_type
DATA_TYPE COUNT(*)
-------------------- ----------
ANYDATA 6
BLOB 32
CHAR 12335
CLOB 259
DATE 16923
LONG 2
NUMBER 39618
NVARCHAR2 9
RAW 53
ROWID 270
TIMESTAMP(3) 37
TIMESTAMP(6) 109
VARCHAR2 132291
XMLTYPE 2
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange