Way to Find List of indexes

Database

Way to Find List of indexes

Hi all,

Is there any way to find names list of all Primary, Secondary indexes in a table.Have checked in the DBC.Indices some of the indexes names were represented as nulls and moreover If a partitioned Primary index and primary indexes were both present in a table then the index names of PPI were not present in dbc.indices..My requirement is to check the names of indexes(may be primary or Secondary or PPI or Composite)if it is present do the following activity or else skip those indexes for those activities...

1 REPLY
N/A

Re: Way to Find List of indexes

Hi,
if it can help ... the request returns a ligne for each column

Pierre

-- IndexType:
-- P (Nonpartitioned Primary)
-- Q (Partitioned Primary)
-- S (Secondary)
-- J (join index)
-- N (hash index)
-- K (primary key)
-- U (unique constraint)
-- V (value ordered secondary)
-- H (hash ordered ALL covering secondary)
-- O (valued ordered ALL covering secondary)
-- I (ordering column of a composite secondary index)
-- M (Multi-column statistics)
-- D (Derived column partition statistics)
-- 1 (field1 column of a join or hash index)
-- 2 (field2 column of a join or hash index)

select
databasename, tablename, columnname,
indextype,
indexnumber,
indexname
from dbc.indices

order by databasename, tablename,indexnumber;