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

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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;