List:General Discussion« Previous MessageNext Message »
From:Eric Jensen Date:July 20 2005 6:00pm
Subject:Remove Unique Key
View as plain text  
I have a field that was set as a unique key when created via:
UNIQUE KEY `username` (`username`)

I no longer want it unique, but can't see a way with ALTER TABLE to
remove it.  It isn't the Primary Key or an index.  The describe looks
like this:

+----------+-------------+------+-----+---------+-------+
| Field    | Type        | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| username | varchar(25) |      | UNI |         |       |
+----------+-------------+------+-----+---------+-------+

Anything I can do short of dumping the table, droping it, then
re-inserting everything?

Eric

Thread
Remove Unique KeyEric Jensen20 Jul
  • Re: Remove Unique KeyJoseph20 Jul
  • Re: Remove Unique KeySGreen20 Jul