assuming col2 is set up with UNIQUE index option, and
'newvalue' is not
same as in some other row in the table, this should work just
fine:
UPDATE mytable
SET
col1 = 'someting',
col2 = 'newvalue'
WHERE col2 = 'oldvalue'
this should also work fine, if you need to update other
columns, but not
col2:
UPDATE mytable
SET col1 = 'someting'
WHERE col2 = 'oldvalue'
are you sure you don;t have some other constraints, maybe on
some other
columns, interfering with your update?
posting your code may help...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/