17.10 - Example: Creating an Unnamed Nonunique Secondary Index - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

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;