CREATE INDEX SQL Statement | Teradata Vantage - CREATE INDEX - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Creates a secondary index on an existing data table or join index.

Teradata Vantage™ - SQL Fundamentals, B035-1141 provides an overview of secondary indexes, while Teradata Vantage™ - Database Design, B035-1094 provides more detail.

ANSI Compliance

CREATE INDEX is a Teradata extension to the ANSI SQL:2011 standard. The ANSI SQL standard does not define DDL for creating indexes.

The CREATE UNIQUE INDEX syntax is functionally equivalent to adding a UNIQUE NOT NULL or PRIMARY KEY NOT NULL constraint set to a column in ANSI SQL:2011 if all of the columns in the column set are NOT NULL.

A CREATE UNIQUE INDEX statement on a column set where one or more columns are nullable is similar.

Required Privileges

You must have the INDEX or DROP TABLE privilege on the table or join index.

Privileges Granted Automatically

None.