List indexes on a table


set verify off
set echo off
set pagesize 9999
set linesize 300

column index_name format a32 heading "Index"
column column_name format a32 heading "Column"
column column_position format 999 heading "Pos"
column descend heading "Asc?"

accept tableName prompt "Table: "

select index_name,
column_position,
column_name,
descend
from dba_ind_columns
where table_name = upper('&tableName')
order by index_name,
column_position;