Skip to content

TRANSLATION

SELECT TRANSLATE('12345', '143', 'ax') FROM DUAL;
a2x5

The TRANSLATE function in Oracle is used to replace a sequence of characters in a string with another set of characters. In the example provided, ‘143’ sequence is replaced by ‘ax’ in the string ‘12345’. The digit 1 is replaced with ‘a’, 4 is deleted as it does not have a replacement in the ‘ax’ string and 3 is replaced with ‘x’, giving the result ‘a2x5’.