Wednesday, April 24, 2024

MySQL - replace a character with another

 

Romanian language - changing letters that use sedila with letters that use commas

UPDATE tableName SET columnNameX = REPLACE(columnNameX, "ş", "ș") where 1;
UPDATE tableName SET columnNameY = REPLACE(columnNameY, "ş", "ș") where 1;

UPDATE tableName SET columnNameX = REPLACE(columnNameX, "ţ", "ț") where 1;
UPDATE tableName SET columnNameY = REPLACE(columnNameY, "ţ", "ț") where 1;