titlesidebar_labeldescription
ALTER TABLE COLUMN ADD INDEX
ADD INDEX
ADD INDEX SQL keyword reference documentation.

Adds new index of type symbol to an existing column.

Adding an index is an atomic, non-blocking and non-waiting operation. Once complete, the SQL optimizer will start using the new index for SQL executions.

:::info

For more information about indexes please refer to the INDEX documentation

:::

Syntax

Flow chart showing the syntax of the ALTER TABLE keyword Flow chart showing the syntax of the ALTER TABLE with ADD INDEX keyword

Example

  1. ALTER TABLE trades ALTER COLUMN instrument ADD INDEX;