I created a table that contains a UNIQUE \'mobile_no\' like
09727048248
9727048248
9824578564
9898998998
Then I am going to check whether o
If you have declared the mobile number as the primary key in your table, then you can’t have the same mobile number twice in your table. Have a look at the MySQL UPDATE documentation.
Use UPDATE IGNORE
:
update IGNORE bccontacts
set mobile_no='919727048248'
where mobile_no=09727048248
More info here: http://dev.mysql.com/doc/refman/5.0/en/update.html