For “normal” indexes, USER_IND_COLUMNS will contain the column name(s) for an index, but things (appear to) go astray when looking at function-based indexes.
SQL> create table blah ( x varchar2(30));
Table created.
SQL> create index blah_ix on blah ( upper(x));
Index created.
SQL> select column_name from user_ind_columns
2 where index_name = 'BLAH_IX'
3 /
COLUMN_NAME
------------------------------
SYS_NC00002$
Don’t panic. Simply take a look at USER_IND_EXPRESSIONS to find the function that you used.
SQL> select column_expression from user_ind_expressions
2 where index_name = 'BLAH_IX'
3 /
COLUMN_EXPRESSION
--------------------------------------------------------------------------------
UPPER("X")
Easy peasy




Got some thoughts? Leave a comment