“MySQL 语句:数据定义语句(DDL):“CREATE INDEX”语句”的版本间差异
跳到导航
跳到搜索
(建立内容为“category:MySQL == 关于 ==”的新页面) |
小无编辑摘要 |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
[[category: | [[category:MySQL文档]] | ||
== 关于 == | == 关于 == | ||
<syntaxhighlight lang="mysql"> | |||
CREATE [UNIQUE | FULLTEXT | SPATIAL] INDEX index_name | |||
[index_type] | |||
ON tbl_name (key_part,...) | |||
[index_option] | |||
[algorithm_option | lock_option] ... | |||
key_part: | |||
col_name [(length)] [ASC | DESC] | |||
index_option: { | |||
KEY_BLOCK_SIZE [=] value | |||
| index_type | |||
| WITH PARSER parser_name | |||
| COMMENT 'string' | |||
} | |||
index_type: | |||
USING {BTREE | HASH} | |||
algorithm_option: | |||
ALGORITHM [=] {DEFAULT | INPLACE | COPY} | |||
lock_option: | |||
LOCK [=] {DEFAULT | NONE | SHARED | EXCLUSIVE} | |||
</syntaxhighlight> |
2023年3月31日 (五) 23:12的最新版本
关于
CREATE [UNIQUE | FULLTEXT | SPATIAL] INDEX index_name
[index_type]
ON tbl_name (key_part,...)
[index_option]
[algorithm_option | lock_option] ...
key_part:
col_name [(length)] [ASC | DESC]
index_option: {
KEY_BLOCK_SIZE [=] value
| index_type
| WITH PARSER parser_name
| COMMENT 'string'
}
index_type:
USING {BTREE | HASH}
algorithm_option:
ALGORITHM [=] {DEFAULT | INPLACE | COPY}
lock_option:
LOCK [=] {DEFAULT | NONE | SHARED | EXCLUSIVE}