Reputation: 4483
I have a query that fetches the schema of the a table from the oracle data dictionary, and I want to be able to detect which of its columns is a UDT - user-defined type column. is the following SQL reasonable?
select * from
all_tab_cols
join all_types on all_tab_cols.DATA_TYPE_OWNER = all_types.owner
and all_tab_cols.DATA_TYPE = all_types.TYPE_NAME
where ALL_TAB_COLS.owner not in ('SYS', 'SYSTEM', 'XDB')
Upvotes: 0
Views: 216
Reputation: 11591
Yes that is pretty much what you need. Variations really depend on what you consider to be worth including or not. For example.
Upvotes: 1