OT: MySQL mass updates

William O'Higgins Witteman william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Mon Jun 5 18:04:45 UTC 2006


I have a database that needs updating, and I just wanted to see if
anyone has done something like this before.

Here's the problem - I have a constant string in one column that needs
to be updated to a different string, for all record.

In pseudocode, what I want to do is this:
  foreach row in table
    in column A, swap "something" with "somethingelse" leaving the rest
    of the column's content alone

I think that this could be done with a single, fairly simple command,
but I'd hate to screw up the whole database by getting it wrong.

Anyone have any suggestions?  Thanks.
-- 

yours,

William

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://gtalug.org/pipermail/legacy/attachments/20060605/12337317/attachment.sig>


More information about the Legacy mailing list