Skip to content

Instantly share code, notes, and snippets.

@fljdin
Last active September 21, 2017 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fljdin/889c36bff95ff809596677b4cc8c2761 to your computer and use it in GitHub Desktop.
Save fljdin/889c36bff95ff809596677b4cc8c2761 to your computer and use it in GitHub Desktop.
set line 200
col columns for a100
select i.table_name, i.index_name, listagg(i.column_name, ',') within group (order by i.column_position) columns
from dba_ind_columns i
left join dba_constraints c on i.index_name = c.index_name
where i.index_owner = '&owner' and i.table_name = '&table'
group by i.table_name, i.index_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment