Syntax
alter_option depends on the operation you want to perform on the index. For all supported clauses, see the sections below.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The ALTER INDEX command modifies the definition of an index.
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.
RENAME TOALTER 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. |
-- Change the name of the index "idx_1" to "idx_2"
ALTER INDEX idx_1 RENAME TO idx_2.
Was this page helpful?