How to do a "sed-like" update command in mysql?

Dear mates,
imagine a table with only one column and 10 rows containing 5 yahoo.de and 5 gmail.com email addressess.

mail1@yahoo.de
mail2@yahoo.de
mail3@yahoo.de
mail4@yahoo.de
mail5@yahoo.de
mail1@gmail.com
mail2@gmail.com
mail3@gmail.com
mail4@gmail.com
mail5@gmail.com

How could I replace only the "yahoo.de" part to "yahoo.com"? Is it even possible?

Kind regards,
pseudocoder

EDIT: btw. I'm not sure if this is the right forum sub-category. Please feel free to move this thread in a more appropriate category if there is any.

update table_name set email = replace(email,'yahoo.de', 'yahoo.com');
1 Like

Woow! That worked like a charm! You're the man :slight_smile:

Thanks a lot!