ODBC Named Indexes - ODBC Driver for Teradata

ODBC Driver for Teradata User Guide

Product
ODBC Driver for Teradata
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-07-11
dita:mapPath
smj1488824663219.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities
Using this feature is not recommended, because it is deprecated.
ODBC-style named indexes only work with the legacy parser. To enable the legacy parser through odbc.ini in UNIX/Linux and Apple OS X platforms, refer to the description of the "EnableLegacyParser=[Yes|No]" option in Teradata DSN Options. To enable the legacy parser through ODBC Administrator in the Windows platform, refer to the description of the "Enable Legacy Parser" check box in Teradata ODBC Driver Options. To enable the legacy parser through ODBC Administrator in the Apple OS X platform, refer to the description of the "Enable Legacy Parser" check box in Configuring a DSN Using ODBC Administrator Tool.

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).