Home » Open Source » MySQL » UNIQUE KEY (MYSQL)
UNIQUE KEY [message #591706] Wed, 31 July 2013 02:00 Go to next message
satheesh_ss
Messages: 61
Registered: July 2012
Member
Hi this is my table structure...

mysql> desc one
    -> ;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| id    | int(11) | NO   | PRI | NULL    |       |
| empno | int(11) | NO   | UNI | NULL    |       |
+-------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)


I want to remove UNIQUE KEY from the above table.

How can i drop unique key from the table.
Re: UNIQUE KEY [message #591708 is a reply to message #591706] Wed, 31 July 2013 02:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
http://www.google.com/?q=mysql+drop+unique+constraint

Regards
Michel
Re: UNIQUE KEY [message #591709 is a reply to message #591706] Wed, 31 July 2013 02:10 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
DROP INDEX or ALTER TABLE DROP INDEX, I guess. Such as
alter table one drop index unique_key_name;
Re: UNIQUE KEY [message #593141 is a reply to message #591709] Wed, 14 August 2013 09:39 Go to previous messageGo to next message
satheeshsharma
Messages: 11
Registered: August 2013
Location: Chennai
Junior Member
i didn't mention any constraint name for the check constraint...I simple used UNIQUE at the time of column creation...Hope u understand wat i am saying....


If that is the case, how can i drop UNIQUE constraint from the column...here i didnt give any index name...

[Updated on: Wed, 14 August 2013 09:40]

Report message to a moderator

Re: UNIQUE KEY [message #593150 is a reply to message #593141] Wed, 14 August 2013 10:35 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Did you click on the link I gave?

Regards
Michel
Previous Topic: Constraint
Next Topic: Locking in Mysql procedure
Goto Forum:
  


Current Time: Sat Nov 23 02:10:23 CST 2024