Indexes - Display all indexes and columns for a specified table owned by current
set echo off
--
--  Name: show_user_indexes.sql    
--
--  Parms: [optional] 
--     #1: table_name
--
--  Description: Indexes - Display all indexes and columns for a specified table owned by current user
--
--  Compatability: 7.3 and above
--
--  Usage: @show_user_indexes table_name     
--         @show_user_indexes tablea
--
set verify off
--
define lsize=133
set linesize &&lsize
--
column column_position format 99
column column_name format A30
column index_name format A30 
break on index_name
select a.index_name, uniqueness, a.column_name, a.column_position 
from user_ind_columns a, user_indexes b
where b.table_name = upper('&1')
and a.index_name = b.index_name
order by a.index_name, a.column_position
;
--
set verify on