Translate check and replace character by character in the string like this
example-
SELECT TRANSLATE('AGDFADCDA ANLKAKE ABZUYA','AG','ZY') FROM DUAL;
here in all three words ('AGDFADCDA ANLKAKE ABZUYA') the character ‘A’ , ‘G’
and ‘AG’ are replace by character ‘Z’,’Y’ or ‘ZY’ . So the output is: -
ZYDFZDCDZ ZNLKZKE ZBZUYZ But in other hand Replace check and replace word by
word in the string like This example-
SELECT REPLACE ('AGDFADCDA ANLKAKE ABZUYA','AG','ZY') FROM DUAL;
Here in all three words ('AGDFADCDA ANLKAKE ABZUYA') only the first word where
‘AG’ came together is changed and remain word are same. It is because in other
words ‘AG’ not came together and replace can change words. So the output is: -
ZYDFADCDA ANLKAKE ABZUYA
Read it careful and try to understand.
Thanks