16.20 - Example: Creating an Unnamed Nonunique Secondary Index - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Content Type
Programming Reference
Publication ID
B035-1144-162K
Language
English (United States)
Last Update
2019-05-24

The first example creates a nonunique secondary index on the dept_no column of the employee table:

     CREATE INDEX (dept_no) ON employee;

The UNIQUE option is not used in this request because multiple rows contain the same department number. The index should be useful, however, because department numbers are often used for conditional retrievals and for ordering employee listings.

The second example creates an unnamed nonunique secondary index on the column_1 column of a table named table_4.

     CREATE INDEX (column_1) ON table_4;