You can query the metadata tables to get a list of columns. For example:
Oracle:
select column_name
from all_tab_cols
where table_name='YOUR_TABLE'
order by column_id;
Snowflake:
select column_name
from information_schema.columns
where lower(table_name)='YOUR_TABLE'
order by ordinal_position;