SQL Language Guide : 8. SQL Statements : CREATE INDEX
 
Share this page                  
CREATE INDEX
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The CREATE INDEX statement creates an index on an existing table. When the WITH STRUCTURE clause is omitted, it creates a primary (clustered) index. When WITH STRUCTURE=VECTORWISE_SI is used, it creates a secondary index on additional columns.
Note:  Vertical (column-level) partitioning is not supported for indexes.
This statement has the following format:
CREATE INDEX [schema.]index_name ON
   [schema.]table_name (column_name {, column_name})
   WITH-clause
index_name
Defines the name of the index. It must be a valid object name.
table_name
Specifies the table on which the index is to be created.
column_name
Specifies a list of columns from the table to be included in the index.
WITH-clause
Specifies WITH clause options:
WITH STRUCTURE=
Specifies the index structure:
VECTORWISE_IX
(Default) Creates a primary (clustered) index. Only one primary index per table is allowed.
VECTORWISE_SI
Creates a secondary index on additional columns. Can also be specified as VWSI.
Note:  Secondary indexes are not supported for partitioned tables.