It would be helpful if there were a function that could get a UDT value's type in a query:
Testing a UDT in Oracle Live SQL: Describe a query's column datatype without creating a view
----------------------------------------------------------------------------------------------------
I'm aware that there is a workaround where we can create a view from a query, and then look at user_tab_columns
to see the datatype:
select data_type
from user_tab_columns
where table_name = 'MY_ST_GEOMETRY_VW';
Result:
DATA_TYPE
--------------
MY_ST_GEOMETRY
That works, but it would be nice if there were a more convenient way to determine the datatype of a UDT value in a query. A DataType()
function might be ideal.