时间:2021-07-01 10:21:17 帮助过:28人阅读
复合索引
ALTER TABLE crm_customer ADD INDEX phone_org (`telephone`, `orgid`);
参考:
1.添加PRIMARY KEY(主键索引)
mysql>ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` )
2.添加UNIQUE(唯一索引)
mysql>ALTER TABLE `table_name` ADD UNIQUE ( `column` )
3.添加INDEX(普通索引)
mysql>ALTER TABLE `table_name` ADD INDEX index_name ( `column` )
4.添加FULLTEXT(全文索引)
mysql>ALTER TABLE `table_name` ADD FULLTEXT ( `column`)
5.添加多列索引
mysql>ALTER TABLE `table_name` ADD INDEX index_name ( `column1`, `column2`, `column3` )
mysql 创建索引
标签:索引 dex 创建索引 sql 创建索引 mic body 全文索引 code 主键索引