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

Create Tables in Oracle Database using TOAD

How to create Oracle stored Procedures using TOAD for Oracle

How to Create Packages in Oracle Database using TOAD for Oracle