In Oracle, the replace() function is used to replace a string. It can find the specified character in the specified string and replace it with the new character; syntax "REPLACE('string','search value' ,'replacement value');".
The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.
In Oracle, the replace() function is used to replace strings.
Thereplace() function finds the specified character in the specified string and replaces it with the new character.
Syntax:
SELECT REPLACE(X,old,new)
Find the old character in the string X and replace it with the new character
Note: REPLACE() is case-sensitive when searching for old match.
Example:
SQL> SELECT REPLACE('www.php.cn', 'w', 'Ww'); +---------------------------------------------------------+ | REPLACE('www.php.cn', 'w', 'Ww') | +---------------------------------------------------------+ | WwWwWw.php.cn | +---------------------------------------------------------+ 1 row in set (0.00 sec)
Recommended tutorial: "Oracle Tutorial"
The above is the detailed content of How to use oracle replace() function. For more information, please follow other related articles on the PHP Chinese website!