Home > Database > Oracle > body text

How to use oracle replace() function

青灯夜游
Release: 2022-03-01 19:25:18
Original
40711 people have browsed it

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');".

How to use oracle replace() function

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)
Copy after login

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)
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!