How to remove unique key from mysql table

后端 未结 7 1934
旧巷少年郎
旧巷少年郎 2021-01-30 08:34

I need to remove a unique key from my mysql table. How can remove that using mysql query.

I tried this but it is not working

alter table tbl_quiz_attempt         


        
相关标签:
7条回答
  • 2021-01-30 09:00

    All keys are named, you should use something like this -

    ALTER TABLE tbl_quiz_attempt_master
      DROP INDEX index_name;
    

    To drop primary key use this one -

    ALTER TABLE tbl_quiz_attempt_master
      DROP INDEX `PRIMARY`;
    

    ALTER TABLE Syntax.

    0 讨论(0)
提交回复
热议问题