View Single Post
Old 11-27-2012, 05:34 PM  
scouser
marketer.
 
Industry Role:
Join Date: Aug 2006
Location: bcn
Posts: 2,280
Quote:
Originally Posted by lezinterracial View Post
Where I used to work we would run like this

Select from table where id="1";

UPDATE table
SET id="1"
where
id="2"
;

Select from table where id="1";

Rollback;

After the SQL ran, View the output results to verify it ran successfully. Then run it without the rollback line. This was with DB2 though. I don't know about MySQL.
that would replace the whole field value and set it to the new value, no tjust replace a word within a string (assuming thats what he wanted)
scouser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote