Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMyAdmin Removing an index

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

like image 767
Samuel Meddows Avatar asked Dec 01 '10 00:12

Samuel Meddows


People also ask

How do I delete a key in PhpMyAdmin?

We can remove PRIMARY KEY constraint from a column of an existing table by using DROP keyword along with ALTER TABLE statement.

How do you drop a composite index?

Try the following command: show index from `my_answers`; then inspect the key name of your index and drop it by its name.

Does dropping an index lock a table MySQL?

Indexes on variable-width columns of NDB tables are dropped online; that is, without any table copying. The table is not locked against access from other NDB Cluster API nodes, although it is locked against other operations on the same API node for the duration of the operation.


2 Answers

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

like image 173
Michael Tabolsky Avatar answered Sep 21 '22 01:09

Michael Tabolsky


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

like image 40
vineet Avatar answered Sep 23 '22 01:09

vineet