创建索引
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}
index_option:
KEY_BLOCK_SIZE [=] value
| index_type
| WITH PARSER parser_name
| COMMENT 'string'
举例:
mysql>use ehrt;
mysql> create index Index _Name on t1(id);
备注:
1.详细项目中索引名必须规范处理,如IDX_tablename;
2.和Oracle不同的是MySQL索引不必指定表空间;
--未完待续
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}
index_option:
KEY_BLOCK_SIZE [=] value
| index_type
| WITH PARSER parser_name
| COMMENT 'string'
举例:
mysql>use ehrt;
mysql> create index Index _Name on t1(id);
备注:
1.详细项目中索引名必须规范处理,如IDX_tablename;
2.和Oracle不同的是MySQL索引不必指定表空间;
--未完待续