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

Popular posts from this blog

What is Oracle Integration Cloud Service - ICS?

How to Create Packages in Oracle Database using TOAD for Oracle

How to create a Simple Scheduler Job in Oracle Database using Toad