View Single Post
Old 09-16-2021, 07:42 PM  
natkejs
Confirmed User
 
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,616
Quote:
Originally Posted by ZTT View Post
UPDATE table SET pets = 'zombie';
This, and you can mimic replace behavior with a where statement.

Code:
UPDATE table SET pets = 'zombie' WHERE pets = 'cat';
Or if you're replacing multiple values

Code:
UPDATE table SET pets = 'zombie' WHERE pets IN ('cat','dog','mouse');
But this is only for columns holding single term values. If you are replacing words inside strings then you need to use the REPLACE statement.
natkejs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote