spool all_ndxs.rslt 

set linesize 80;
set pagesize 1000;
set long 50;
set echo on;

break on "OWNER" on "TABLE NAME" on "INDEX NAME";
 
/* ************************************************ */
/*                                                  */
/* substitute the table_name variable with the new  */
/* name in CAPITAL LETTERS                          */
/*  - will show all the indexes associated with a   */
/*    table                                         */
/*                                                  */
/*         @c:\oracle\sql\all_ndxs.sql              */ 
/*                                                  */
/* ************************************************ */

select substr(TABLE_NAME, 1, 20)     "TABLE NAME",    
       substr(index_name, 1, 30)     "INDEX NAME",
       substr(column_position, 1, 3) "NUM",
       substr(column_name, 1, 20)    "ATTRIBUTE"
from all_ind_columns
order by 1 asc,
         2 asc,
         3 asc,
         4 asc;
         
set echo off;
spool off;
set long 80;
commit;










