Create Index
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Creates an index on one or more columns in a local table.
Syntax
CREATE [UNIQUE] INDEX index_name ON table_name (column_name [, ...])
where:
- UNIQUE
- means that key columns cannot have duplicate values.
- index_name
- specifies the name of the index to be created.
- table_name
- specifies an existing local table.
- column_name
- specifies an existing column.
Notes
- The driver cannot create an index in a remote table; the driver returns an error indicating that the operation cannot be performed on a remote table.
- Creating a unique constraint is the preferred way to specify that the values of a column must be unique.