TRANSLATE()
TRANSLATE() is a SQL function in the String Functions category. Replaces each character in from_chars with the corresponding character in to_chars (character-level replacement). The syntax is TRANSLATE(string, from_chars, to_chars). It accepts string, from_chars, to_chars. It returns translated string. A typical example: SELECT TRANSLATE('1-2-3', '- ', '/'); -- '1/2/3' -- Like REPLACE but character-by-character mapping, not string replacement -- Remove vowels: SELECT TRANSLATE('Hello World', 'aeiou', '.....'); -- 'H.ll. W.rld' A close relative is CONCAT(), which concatenates two or more strings into one string. Returns NULL if any argument is NULL. A close relative is SUBSTRING(), which extracts characters from a string starting at position `start` for `length` characters. A close relative is REPLACE(), which replaces all occurrences of `from_string` with `to_string` in a string. More about this category: String manipulation — CONCAT, SUBSTRING, REPLACE, TRIM, UPPER, LOWER, LENGTH. Related String Functions entries: CONCAT(), SUBSTRING(), REPLACE(), LENGTH(), TRIM(), UPPER(), LOWER(), LPAD() / RPAD().