Jump to content

phpmyadmin how to make NOT unique?


Pembar

Recommended Posts

Hello guys,

 

I am using phpmyadmin and I was trying to figure out how to make a field NOT unique. There is an option to make it unique, on the userinterface. But I can't find the one to remove the unique option.

 

Thank you.

Link to comment
Share on other sites

  • 3 years later...

trq said: "Just don't apply the unique constraint to it." GREAT, that is REALLY HELPFULL. I already pressed the f--king button, how do I remove it! The subject of this thread is not how to not make mistakes, it is how to undo them!!!!

The phmyadmin user interface I'm using has black U on a blue button (not red as josh suggested). Some of the buttons have a grey background. The grey looks like it is disabled the blue looks like it is on. I don not want unique, so I pressed the button. This marked my field as unique, then the button turned grey, now it is disabled and I cannot un-unique it. Clicking on it now does nothing, does not bring up a list with a red X in it.

Fortunately I found a way to do this without trq's AMAZINGLY UNHELPFUL advice: I discovered by accadent that if I drop the index for that field using an SQL command (not the user interface), it also makes it NOT unique. For example:

ALTER TABLE test DROP INDEX name

Link to comment
Share on other sites

  • 1 month later...

Is it still helping if i tell you right know? Coz its look like it has been 3 year since this topic is made. However, i found on web if you decide to drop your unique key, there's 2 method you can follow, first with drop index query on mysql command as usual because unique key is actually an index or (since you asking for this) using PHPMyAdmin and i currently using ver.3.5.7, you can just edit its indexes (its above the information section on the structure tab in the table page you want to edit). Hope its helping and sorry for my bad grammar, greetings from indonesia :)

Link to comment
Share on other sites

  • 7 months later...

You can do this directly from PhpMyAdmin,

 

Click on STRUCTURE.

 

Then you can see a little blue link : +indexes

 

This open the list of your database indexes, you can then click on Drop on the concerned index.

After that your field is not unique anymore.

Link to comment
Share on other sites

  • 1 year later...

Thank you StephaneV

 

A clear explanation that worked, despite the vagaries of the phpMyAdmin  user interface.

 

After fiddling with it to get rid of an unintentional "Unique" status, I had about 4 "unique" indexes as a result of clicking the "obvious" button.

 

Thanks again.

Link to comment
Share on other sites

  • 2 years later...
On 7/5/2009 at 4:51 PM, Pembar said:

Hello guys,

 

I am using phpmyadmin and I was trying to figure out how to make a field NOT unique. There is an option to make it unique, on the userinterface. But I can't find the one to remove the unique option.

 

Thank you.

ALTER TABLE table_name DROP INDEX index_name;
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.