Forum Stats

  • 3,875,555 Users
  • 2,266,945 Discussions
  • 7,912,249 Comments

Discussions

Function to get a UDT value's type in a query

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.

User_1871
1 votes

Active · Last Updated

Comments