Skip to content

sql: add a create index example using a named index #5581

Open
@awoods187

Description

@awoods187

Andy Woods (awoods187) commented:

None of the examples in https://www.cockroachlabs.com/docs/v19.1/create-index.html#main-content show that you can name the index as you create it. I think it'd be nice to have one example like:

create index vehicles_auto_index_fk_city_ref_users on vehicles (city ASC, owner_id ASC);

With one or two sentences that explain this can be done. We mention that you can rename index in Alter Index https://www.cockroachlabs.com/docs/v19.1/alter-index.html.

Jira Issue: DOC-339

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions