Quick Search:
 
 Oracle PL/SQL: List all indexed columns for a given table Jump to:  
Category: >> Oracle PL/SQL >> List all indexed columns for a given table  

<< 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)

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
 


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org