Thursday, November 20, 2008

List all indexed columns for a given table

break on index_name skip 1
col index_name format a30
col uniuenes format a12
col column_name format a30
prompt Indexes for table: &&1
select c.index_name, i.uniqueness, c.column_namefrom user_indexes i, user_ind_columns cwhere i.index_name = c.index_name and i.table_name = upper('&&1')order by c.index_name, c.column_position
/

No comments: