欢迎各位兄弟 发布技术文章

这里的技术是共享的

phpMyAdmin mysql Removing an index 删除唯一约束 有大用

below the list of your "columns" in the table structure you have a small table called "Indexes". Every row is an index. Find there your unique index and drop it using "drop" symbol (red X). If you have it on more than one column then drop it and recreate without the column you don't want unique

shareimprove this answer
 
   
Thanks Michael. All sorted. – Samuel Meddows Dec 1 '10 at 0:47

Follow this steps:-

  1. Click Structure tab of table.
  2. Click Index(below the table).
  3. Click Drop for remove index(s).

enter image description here

shareimprove this answer

来自  http://stackoverflow.com/questions/4320005/phpmyadmin-removing-an-index


 
accepted

A unique constraint is also an index.

First use SHOW INDEX FROM tbl_name to find out the name of the index. The name of the index is stored in the column called key_name in the results of that query.

Then you can use DROP INDEX:

DROP INDEX index_name ON tbl_name

or the ALTER TABLE syntax:

ALTER TABLE tbl_name DROP INDEX index_name
shareimprove this answer
 
   
Sorry sir i had tried it before raising the question ,but its not working – Ankur Mukherjee Aug 15 '10 at 14:26
   
@Ankur Mukherjee: I forgot to mention: You have to change tbl_name and index_name to the name of your actual table and the name of the actual index, respectively. You can see the names in MySQL Query Browser. You can also do SHOW CREATE TABLE tbl_name. – Mark Byers Aug 15 '10 at 14:33
1 
Sir I know that very well and i had tried that only – Ankur Mukherjee Aug 15 '10 at 14:34
   
@Ankur Mukherjee: What is the error message that you get? – Mark Byers Aug 15 '10 at 14:51
   
Error Message:"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 '(player_id,year,tournament)' at line 1" – Ankur MukherjeeAug 15 '10 at 14:56

You can DROP a unique constraint from a table using phpMyAdmin as requested as shown in the table below. A unique constraint has been placed on the Wingspan field. The name of the constraint is the same as the field name, in this instance.

alt text

shareimprove this answer

来自 http://stackoverflow.com/questions/3487691/dropping-unique-constraint-from-mysql-table
唯物品评历史

关注"唯物品评历史",跟着泪痕春雨先生,读懂历史,看彻人生

打开隐藏二维码