mysql创建索引
使用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))
);