Was this helpful?
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=X100SI 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:
X100IX
(Default) Creates a primary (clustered) index. Only one primary index per table is allowed.
X100SI
Creates a secondary index on additional columns. Can also be specified as VWSI.
Last modified date: 12/19/2024