> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# CREATE INDEX

> Creates indexes.

Creates indexes.

You can create the following indexes:

* [Bitmap index](/documents/4.2/table_design/indexes/Bitmap_index.md)
* [N-Gram bloom filter index](/documents/4.2/table_design/indexes/Ngram_Bloom_Filter_Index.md)
* [Full-Text inverted index](/documents/4.2/table_design/indexes/inverted_index.md)
* [Vector index](/documents/4.2/table_design/indexes/vector_index.md)

For detailed instructions and examples on creating these indexes, see the corresponding tutorials listed above.

**Tip**

This operation requires the ALTER privilege on the target table. You can follow the instructions in [GRANT](/documents/4.2/sql-reference/sql-statements/account-management/GRANT.md) to grant this privilege.

## Syntax

```SQL theme={null}
CREATE INDEX index_name ON table_name (column_name) 
[USING { BITMAP | NGRAMBF | GIN | VECTOR } ] 
[(index_property)] 
[COMMENT '<comment>']
```

## Parameter

| **Parameter** | **Required** | **Description** |
| - | - | - |
| index\_name | Yes | The index name. For naming conventions, see [System Limits](/documents/4.2/sql-reference/System_limit.md). |
| table\_name | Yes | The name of the table. |
| column\_name | Yes | The name of the column to build index on. One column can have only one index. If a column already has an index, you cannot create one more index on it. |
| USING | No | The type of the index to create. Valid values: <ul><li>BITMAP (Default)</li><li>NGRAMBF</li><li>GIN</li><li>VECTOR</li></ul> |
| index\_property | No | The properties of the index to create. For `NGRAMBF`, `GIN`, and `VECTOR`, you must specify the corresponding properties. For detailed instructions, see the corresponding tutorials. |
| COMMENT | No | The comment for the index. |

## Examples

Create a table `sales_records` as follows:

```SQL theme={null}
CREATE TABLE sales_records
(
    record_id int,
    seller_id int,
    item_id int
)
DISTRIBUTED BY hash(record_id)
PROPERTIES (
    "replication_num" = "3"
);
```

Create a bitmap index `index3` on the `item_id` column of `sales_records`.

```SQL theme={null}
CREATE INDEX index3 ON sales_records (item_id) USING BITMAP COMMENT '';
```

## Relevant SQLs

* [SHOW INDEX](/documents/4.2/sql-reference/sql-statements/table_bucket_part_index/SHOW_INDEX.md)
* [DROP INDEX](/documents/4.2/sql-reference/sql-statements/table_bucket_part_index/DROP_INDEX.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.