CREATE INDEX

You are viewing an old version of this article. View the current version here.

Sintaxe:

CREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name
    [index_type]
    ON tbl_name (index_col_name,...)
    [index_option] ...

index_col_name:
    col_name [(length)] [ASC | DESC]

index_type:
    USING {BTREE | HASH | RTREE}

index_option:
    KEY_BLOCK_SIZE [=] value
  | index_type
  | WITH PARSER parser_name

Descrição:

CREATE INDEX é mapeado para uma instrução ALTER TABLE para criar índices. Veja ALTER TABLE. CREATE INDEX não pode ser usado para criar uma chave-primária;em vez disso use ALTER TABLE.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.