How to Replace a String Characters with another Set of Characters in Oracle
In Oracle, REPLACE function is used to replace a sequence of characters in a string with another set of characters.
The syntax for the REPLACE function is: REPLACE( string1, string_to_replace, [ replacement_string ] )
Examples:
SELECT REPLACE('PASSWORD','PASS') FROM DUAL;
Result: WORD
SELECT REPLACE('PASSWORD','WORD','PORT') FROM DUAL;
Result: PASSPORT
Comments
Post a Comment