CoderZone.org

Category: >> Oracle PL/SQL >> List all indexed columns for a given table Bookmark and Share

<< lastnext >>

Snippet Name: List all indexed columns for a given table

Description: Easy way to list all indexed columns for a given table.

Comment: (none)

Author: CoderZone
Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 02nd, 2009

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
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 9