Home >Database >Mysql Tutorial >MySQL 修改索引名称_MySQL

MySQL 修改索引名称_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:10:572057browse

对于MySQL 5.7及以上版本,可以执行以下命令:

ALTER TABLE tbl_name RENAME INDEX old_index_name TO new_index_name

对于MySQL 5.7以前的版本,可以执行下面两个命令:

ALTER TABLE tbl_name DROP INDEX old_index_name ALTER TABLE tbl_name ADD INDEX new_index_name(column_name)




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn