15.10 - Example: Creating an Unnamed Nonunique Secondary Index - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)
Last Update
2018-06-05

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;