[code]
Hello,
I need to write a query/procedure that takes index_name as input parameter and would like to return all the INDEXED columns as separated by comma
Eg,
create table test (col1 number, col2 number, col3 varchar2(20));
create index test_indx on test (col1, col2, upper(col3));
in this case, This index is having an expression. some of the indexes there can be an expression, not all the time. Regardless I would like to return only the column name something like below
col1, col2, col3
My below query is not correct, it is not displaying the expression column so I would appreciate if you can get me the correct query. Thanks in advance
SELECT
aic.column_name
FROM all_ind_columns aic, all_ind_expressions aie
WHERE aic.index_name = aie.index_name(+)
AND aic.index_owner = aie.index_owner(+)
AND aic.column_position = aie.column_position(+)
and aic.table_name ='TEST'
[/code]