mysql: Updating characters in a database

So I have table, and it looks something like this:

MerchantName
-----------
El Restaurante
The Restaurant
Il RDötorante

The thing is, I know I can do:

update table
set merchantName = 'Il Ristorante'
where merchantName like 'Il%'

but what if there's more like this, and with different names? I'm looking for a full solution, something like this:

update table
set ö = 'isto'
wherever these characters exist in the table

Is something like this possible? Thanks very much

Upvotes: 0

Views: 69

Answers (1)

Giorgos Betsos
Giorgos Betsos

Reputation: 72175

I think you are looking for something like this:

UPDATE mytable
SET MerchantName = REPLACE(MerchantName, N'ö', 'isto');

Demo here

Upvotes: 1

Related Questions