17.20 - ODBC Named Indexes - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-06-21
dita:mapPath
uqj1639470627591.ditamap
dita:ditavalPath
nkw1500504256726.ditaval
Using this feature is not recommended, because it is deprecated.

ODBC index-name grammar is supported on a per workstation basis for the following:

CREATE INDEX
DROP INDEX
DROP TABLE
SQLStatistics()

For example,

CREATE INDEX myindex ON mytable (column1, column2)

ODBC grammar ASC and DESC column-identifier clauses for CREATE INDEX are ignored since Teradata does not support this type of indexing. It is possible to DROP an index using the index-name which was specified when it was created, provided you are working on the same PC and the IndexName entry in the Registry file has not been reused.

The specified index-name need not exist on the PC; it is not relevant to Teradata because an index is created for the specified table using the standard index grammar.

For example,

CREATE INDEX (columnname(s)) ON tablename

If the named index has been deleted from the Registry, or if a user is on a different PC, the index needs to be DROPped using the Teradata grammar by specifying the tablename and columns that make up the index. For example,

DROP INDEX (columnname(s)) ON tablename

You cannot DROP a Teradata named index (for example, TableName004).