宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

1.添加primary key主键索引)

alter   table  表名称   add  primary   key列名);

2.添加unique唯一索引)

alter  table  表名称  add  unique列名);

3.添加index普通索引)

alter  table  表名称  add  index  索引名index_name)  列名);

4.添加fulltext全文索引)

alter  table  表名称  add  fulltext  列名);

5.添加多列索引

alter  table  表名称  add  index  索引名index_name)  列名1,列名2.......);

原文作者:zqzhang2
原文链接:https://blog.csdn.net/zqzhang2/article/details/50729072