MySQL Forums
Forum List  »  Oracle

How to update Unique Key Column?
Posted by: Sathiya Moorthy
Date: June 10, 2013 10:51AM

Hi All,

I have Unique key column for `Mobile`. I am getting the Duplicate key entry Error.
Infact, i am not going to enter the duplicate value into the unique column, but i entered the same value in update query.

For ex:
if Table looks like

Username | Mobile(UniqueKey)
abc | 123
bbc | 456

if I am going to execute the following query means, i will get an error like 'Duplicate key '123' for `Mobile`

Update table1 set `username`='TEST'
MOBILE = '123'
WHERE `USERNAME`='abc'

PLEASE ANYONE CLARIFY REGARDING THIS ISSUE

THANKS IN ADVANCE.
SATHIYAMOORTHY

Options: ReplyQuote


Subject
Views
Written By
Posted
How to update Unique Key Column?
3907
June 10, 2013 10:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.