Saturday, June 25, 2016

find indexed table-columns

SELECT
  a.owner,
  a.table_name,
  b.index_name,
  b.column_name
FROM dba_tables a
  LEFT JOIN dba_ind_columns b
  ON a.table_name=b.table_name
WHERE a.owner  ='&owner' and a.table_name='&table_name'
ORDER BY a.table_name,b.index_name,b.column_name;

No comments: