2014-01-23 89 views
1

我的代碼如何刪除Mysql中的唯一約束?

alter table mytable drop unique constraint uk_mytable; 

,但顯示了以下錯誤...

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'unique constraint username' at line 1" 
+0

http://stackoverflow.com/questions/3487691/dropping-unique-約束來自MySQL的表 – Damodaran

回答

1

試試這個

alter table mytable drop uk_mytable;