55

I have a column in one of my tables which has been assigned an index. It is preventing me from having two of the same ID number.

I am assuming the reason it is not letting me have two entries of the same ID is because it has been set to be Unique.

I am wondering how do I remove this rule so that I can insert the same ID number several times.

Cheers

Samuel Meddows
  • 36,162
  • 12
  • 38
  • 36

4 Answers4

97

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

Michael Tabolsky
  • 3,429
  • 2
  • 18
  • 11
  • 13
    In my current version pf PhpMyAdmin, the Indexes panel is collapsed by default. You first need to click on the `+ Indexes` link. (I am unable to determine which version this is...) – Ivo Renkema Aug 26 '16 at 08:06
  • 1
    How to Drop a unique index, without DROPPING the Field? – ejbytes May 11 '17 at 00:59
  • 1
    Yes, it's collapsed by default that's why people can't find it at first sight. – COil Oct 12 '17 at 09:39
74

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

vineet
  • 13,832
  • 10
  • 56
  • 76
13

In the tab structure below the table the indexes are listed. In some versions of PHPMyAdmin the index are listed only if you click on "+Indexes" which is easy to overlook.

Gunnar Bernstein
  • 6,074
  • 2
  • 45
  • 67
0

ALTER TABLE dbName.table DROP INDEX indexName