16.20 - Example: Using Indices - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Dictionary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
zzu1512081120577.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The following SELECT statement displays index information for all the tables in the Personnel database:

SELECT TableName,ColumnName,ColumnPosition,IndexType,UniqueFlag FROM
    DBC.Indices
       WHERE DatabaseName = ’Personnel’
       ORDER BY TableName,ColumnPosition ;

The results of this query are as follows:

TableName   ColumnName   ColumnPosition   IndexType   UniqueFlag
----------  ----------   --------------   ---------   ----------
Charges     Proj_id               1             S       N
Charges     EmpNo                 1             P       N
Charges     Proj_id               2             P       N
Department  DeptNo                1             P       Y
Employee    EmpNo                 1             P       Y
Employee    Name                  1             S       N
Project     Proj_id               1             P       Y