Paste this into a new question or an answer at dba.stackexchange.com:
<!-- --> > create type tbl_t as table of varchar(100); > > <pre> > ✓ > </pre> <!-- --> > create table foo(bar varchar(100)); > > <pre> > ✓ > </pre> <!-- --> > insert into foo(bar) values('A'); > > <pre> 1 rows affected > </pre> <!-- --> > insert into foo(bar) values('B'); > > <pre> 1 rows affected > </pre> <!-- --> > with w as (select 1 baz, cast(collect(bar) as tbl_t) qux from foo) > select * from w > union all > select baz,null from w; > > <pre> > BAZ | QUX > --: | :-- > </pre> <!-- --> > with w as (select 1 baz, dump(collect(bar),16) from foo) > select * from w > union all > select * from w; > > <pre> > BAZ | DUMP(COLLECT(BAR),16) > --: | :--------------------------------------------------------------- > 1 | Typ=58 Len=19: c0,29,27,a,0,0,0,0,f8,b1,cc,e2,5c,7f,0,0,80,51,d2 > 1 | Typ=58 Len=19: c0,29,27,a,0,0,0,0,f8,b1,cc,e2,5c,7f,0,0,80,51,d2 > </pre> *db<>fiddle [here](https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=12bd47a78b18ec1ac86885c531b67d17)*
back to fiddle