mysql - Does UPDATE overwrite values if they are identical? -
i want update vale in database if different. reading through oracle docs on update, says...
...the update statement updates columns of existing rows in named table new values.
since doesn't won't overwrite identical values, should take statement literally? mean mysql sort of boolean matching check me?
no, mysql won't overwrite identical values.
lets insert data:
insert foo(id,val1,val2,val3) values (0,1,2,3); query ok, 1 row affected (0.00 sec)
if update same values:
update foo set id=0, val1=1, val2=2, val3=3 id=0; query ok, 0 rows affected (0.00 sec) rows matched: 1 changed: 0 warnings: 0
take on servers response 0 rows affected
Comments
Post a Comment