Home > Database > Mysql Tutorial > body text

How to delete unique constraint in mysql

藏色散人
Release: 2021-12-02 15:41:05
Original
10161 people have browsed it

Mysql method to delete unique constraints: 1. Use the "alter table table name drop index constraint name;" syntax to delete; 2. Just delete the index index directly.

How to delete unique constraint in mysql

The operating environment of this article: Windows 7 system, Mysql version 5.7.14, Dell G3 computer.

How to delete a unique constraint in mysql?

Mysql deletes a unique constraint:

The unique constraint is also an index.

Therefore, when deleting the constraint, use the alter syntax to delete the index:

alter table 表名 drop index 约束名;
Copy after login

Or delete the index index directly.

Recommended learning: "mysql video tutorial"

The above is the detailed content of How to delete unique constraint in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!