clear markdown help donate comments/suggestions/bugs a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith?
By using dbfiddle, you agree to license everything you submit by Creative Commons CC0

create type tbl_t as table of varchar(100);

create table foo(bar varchar(100));

insert into foo(bar) values('A');
1 rows affected

insert into foo(bar) values('B');
1 rows affected

select * from foo;
BAR
A
B

select cast(collect(to_char(bar)) as tbl_t) from foo;
CAST(COLLECT(TO_CHAR(BAR))ASTBL_T)

select * from table((select cast(collect(to_char(bar)) as tbl_t) from foo));
COLUMN_VALUE
A
B