Resolved: Use of Index for removal of UNIQUE KEY
Why you had use the index for dropping Unique key? Is there Any other way to drop Unique Key?
1 answers ( 1 marked as helpful)
Hi Shashank!
Thanks for reaching out.
This is because the UNIQUE KEY
constraint is an index. So, we have to use the following syntax:
ALTER TABLE table_name
DROP INDEX key_name;
You can use the following command to see the indexes of a particular table:
SHOW INDEX FROM <table_name>
Hope this helps.
Best,
Tsvetelin