> ## Documentation Index
> Fetch the complete documentation index at: https://risingwavelabs-wyx-add-timestamp-dedicated-page.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ALTER INDEX

> The `ALTER INDEX` command modifies the definition of an index.

## Syntax

```sql theme={null}
ALTER INDEX index_name
    alter_option;
```

*`alter_option`* depends on the operation you want to perform on the index. For all supported clauses, see the sections below.

## Clause

### `RENAME TO`

```sql theme={null}
ALTER INDEX index_name
    RENAME TO new_name;
```

| Parameter or clause | Description                                                                                                                                                                                                       |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **RENAME TO**       | This clause changes the name of the index. If the index is associated with a table constraint (either UNIQUE, PRIMARY KEY, or EXCLUDE), the constraint is renamed as well. There is no effect on the stored data. |
| *new\_name*         | The new name of the index.                                                                                                                                                                                        |

```sql theme={null}
-- Change the name of the index "idx_1" to "idx_2"
ALTER INDEX idx_1 RENAME TO idx_2.
```
