user391986
user391986

Reputation: 30896

mysql replace piece of a string for some entries

I have a table "mytable" with a field "name" of varchar. I need to replace the string "iphone" in each string to "blackberry" how can I do that in one go?

Upvotes: 0

Views: 61

Answers (1)

pete
pete

Reputation: 25081

MySQL String Functions

UPDATE mytable
SET name = REPLACE(name, 'iphone', 'blackberry')

Upvotes: 3

Related Questions