MySql添加索引的五种方法

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

全部评论

相关推荐

09-21 21:14
门头沟学院
否极泰来来来来:和他说:这里不好骂你,我们加个微信聊
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务