码迷,mamicode.com
首页 > 数据库 > 详细

Mysql创建删除索引

时间:2015-06-17 19:44:56      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

1.查看某个表中的索引

show index from 表名

2.为某个表创建索引

alter table 表名 add index 索引名(列名)    //此种方式创建一般的索引

alter table 表名 add unique 索引名(列名)  //创建唯一索引

3.删除某个表的索引

drop index 索引名 on 表名

Mysql创建删除索引

标签:

原文地址:http://www.cnblogs.com/knight-monkey/p/Monkey_study_mysql.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!