I need to convert column into row for the below select column_name from all_tab_cols where table_name=\'TABLE_NAME\' ;
select column_name from all_tab_cols where table_name=\'TABLE_NAME\' ;
COLUMN_1 COLUMN_2 COLUMN_
Try this:
select listagg(A,' ') within group (order by A) as Names from test
In ur case the query goes like:
select listagg(column_name,' ') within group (order by column_name) as column_name from all_tab_cols where table_name='TABLE_NAME' ;