3.1.3 INDEX DDL

3.1.3.1 CREATE INDEX Syntax

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

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

index_type:
    USING {BTREE | HASH}

例:

create unique index idx1 using btree on test(col1);
create index idx2 using hash on test(col2);
create fulltext index idx3 on test(col4);
create fulltext index idx4 on test(col4(10));

3.1.3.2 DROP INDEX Syntax

DROP INDEX index_name ON tbl_name

例:

drop index idx1 on test;

results matching ""

    No results matching ""