これを試してください:
select listagg(A,' ') within group (order by A) as Names
from test
あなたの場合、クエリは次のようになります:
select listagg(column_name,' ') within group (order by column_name) as column_name
from all_tab_cols
where table_name='TABLE_NAME' ;
これを試してください:
select listagg(A,' ') within group (order by A) as Names
from test
あなたの場合、クエリは次のようになります:
select listagg(column_name,' ') within group (order by column_name) as column_name
from all_tab_cols
where table_name='TABLE_NAME' ;