Database Scripts

 Log In    |   Sign Up

Oracle : Find All Indexed Columns in a Table

Added on Apr-09-2012 by tonyreg
For Oracle

Tags : index

This script provides a listing of all the indexed columns in a table


Oracle 10g


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_name
from   user_indexes i, user_ind_columns c
where  i.index_name = c.index_name
  and  i.table_name = upper('&&1')
order  by c.index_name, c.column_position

undef 1


Report Script

blog comments powered by Disqus