Once you know it's a collection (which all_types
tells you), you can look at the all_coll_types
view:
ALL_COLL_TYPES describes all named collection types (varrays and nested tables) accessible to the current user.
In this case you'd see, picking a couple of columns:
select coll_type, elem_type_name, length from all_coll_types where type_name = 'VARCHAR2_TT';
COLL_TYPE ELEM_TYPE_NAME LENGTH
------------------------------ ------------------------------ ----------
TABLE VARCHAR2 2000
For other types of collections some of the other columns will be relevant.
If you had a collection of objects you'd see the object type instead; here as a varray rather than a nested table, just to show the upper bound is available too:
create or replace type my_obj_t as object(id number);
/
create or replace type my_obj_tt as varray(5) of my_obj_t;
/
select coll_type, upper_bound, elem_type_name, length from all_coll_types where type_name = 'MY_OBJ_TT';
COLL_TYPE UPPER_BOUND ELEM_TYPE_NAME LENGTH
------------------------------ ----------- ------------------------------ ----------
VARYING ARRAY 5 MY_OBJ_T
... and so on.
You can also get the DDL to recreate the type with select dbms_metadata.get_ddl('TYPE', 'VARCHAR2_TT') from dual
but that doesn't seem to be what you want here.