How to delete index in MySql, first you need to know the exact name of the INDEX (Unique key in this case) to delete or update it. INDEX names are usually same as column names. In case of more than one INDEX applied on a column, MySQL automatically suffixes numbering to the column names to create unique INDEX names.
For example if 2 indexes are applied on a column named
- The first index will be named as
- The second index will be names as
customer_id_2and so on.
To know the name of the index you want to delete or update
SHOW INDEX FROM <table_name>
To delete an index
ALTER TABLE <table_name> DROP INDEX <index_name>;
Thank u. 😆
Ref : stackoverflow