1、PRIMARY KEY(主键索引) 添加 ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ); 删除 ALTER TABLE `table_name` DROP PRIMARY KEY; 2、UNIQUE(唯一索引) 添加 ALTER TABLE `table_name` ADD UNIQUE ( `column` ); 删除 ALTER TABLE `table_name` DROP INDEX `column`;
https://blog.csdn.net/u012755940/article/details/78276653