Home > Database > Mysql Tutorial > body text

MySQL 修改索引名称_MySQL

WBOY
Release: 2016-06-01 13:10:57
Original
2018 people have browsed it

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

ALTER TABLE tbl_name RENAME INDEX old_index_name TO new_index_name
Copy after login

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

ALTER TABLE tbl_name DROP INDEX old_index_name ALTER TABLE tbl_name ADD INDEX new_index_name(column_name)
Copy after login




source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template