使用create index创建
create index on tablename (columnname(限制长度))
使用alter table创建
ALTER TABLE tableName ADD INDEX indexName(columnName);
创建表时创建索引
CREATE TABLE tableName(
id INT NOT NULL,
columnName columnType,
INDEX [indexName] (columnName(length))
);
标签:INDEX,columnName,创建,tableName,索引,mysql
From: https://www.cnblogs.com/dch0/p/17447506.html