Alter a live table to make a key non-unique

后端 未结 3 1972
故里飘歌
故里飘歌 2020-12-20 12:13

I saw some other questions related to this, but they were not MySQL.

The database is a live database, so I don\'t want to delete and recreate the table. I simply wan

3条回答
  •  情深已故
    2020-12-20 12:50

    Just DROP the unique index. There shouldn't be a problem with the fact that it is a live DB. If it is a really large table, you may block some queries temporarily while the index is removed. But that should only happen if you were adding an index.

    ALTER TABLE table_name DROP INDEX index_name;
    

提交回复
热议问题