Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)
How to drop the "Unique Key Constraint" on a column of a MySQL table using the phpMyAdmin?

1 Answer

0 votes
by (12.7k points)
edited by

A unique constraint is also an index.

First, use SHOW INDEX FROM tbl_name to determine the name of the index. The name of the index will be stored in the column called the "key_name" in the results of the query.

Then you can use the DROP INDEX:

DROP INDEX index_name ON tbl_name

or you can use the ALTER TABLE syntax:

ALTER TABLE tbl_name DROP INDEX index_name

Sign up for this Intellipaat's SQL Course fast, to Learn SQL concepts in detail and get certified.

Related questions

0 votes
1 answer
asked Jan 6, 2021 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...