View Single Post
Old May 14, 2008 | 03:54 PM
  #9  
frog's Avatar
frog
0-60 in 17 seconds (eek)
 
Joined: Apr 2004
Posts: 6,717
Likes: 0
From: Berkshire
Default

Originally Posted by pa_sjo
UPDATE Users SET Name = 'Cunt' WHERE Name = 'Chip'

.. slightly more orthadox?
As chip said, that would update the table directly, however, what you're suggesting isn't the same as:

update users set name = replace(name,'Cunt','Chip') which would update all occurrences of Cunt in the name column regardless of its contents (rows where name is 'My name is Cunt', 'I am a Cunt', etc...)

TRANSLATE is also a very useful function if you want to replace single characters with others
Reply