Pembar Posted July 5, 2009 Share Posted July 5, 2009 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. Quote Link to comment Share on other sites More sharing options...
trq Posted July 5, 2009 Share Posted July 5, 2009 Just don't apply the unique constraint to it. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 5, 2009 Share Posted July 5, 2009 There should be a little button you can use to toggle UNIQUE on/off. Quote Link to comment Share on other sites More sharing options...
.josh Posted July 5, 2009 Share Posted July 5, 2009 When you click the little icon that has a red "U" to make it unique, you will see it listed under "Indexes" (below the list of column names). In that list, you can click the red "X" button to remove it. 1 Quote Link to comment Share on other sites More sharing options...
KayakerMike Posted June 21, 2013 Share Posted June 21, 2013 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 Quote Link to comment Share on other sites More sharing options...
Barand Posted June 21, 2013 Share Posted June 21, 2013 Be aware that dropping the index could have an impact on the efficiency of your queries. You may need to add the index back again - just don't make it a unique index. Quote Link to comment Share on other sites More sharing options...
ninatomato Posted August 14, 2013 Share Posted August 14, 2013 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 Quote Link to comment Share on other sites More sharing options...
StephaneV Posted April 1, 2014 Share Posted April 1, 2014 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. Quote Link to comment Share on other sites More sharing options...
roylow Posted January 7, 2016 Share Posted January 7, 2016 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. Quote Link to comment Share on other sites More sharing options...
madhujadhav Posted August 24, 2018 Share Posted August 24, 2018 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; Quote Link to comment Share on other sites More sharing options...
benanamen Posted August 24, 2018 Share Posted August 24, 2018 (edited) Cmon @madhujadhav, the OP is NINE YEARS AGO. Besides that, the OP asked specifically about Phpmyadmin. Edited August 24, 2018 by benanamen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.