标签:mysql
一、索引
1、添加索引
ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` );
ALTER TABLE `table_name` ADD UNIQUE (`column`);
ALTER TABLE `table_name` ADD INDEX index_name ( `column` );
ALTER TABLE `table_name` ADD FULLTEXT ( `column`);
ALTER TABLE `table_name` ADD INDEX index_name ( `column1`, `column2`, `column3` );
2、删除索引
ALTER TABLE `table_name` DROP PRIMARY KEY;
ALTER TABLE `table_name` DROP INDEX index_name;
标签:mysql
原文地址:http://autophp.blog.51cto.com/8062337/1621796