Home > Database > Mysql Tutorial > body text

Oracle函数之Replace()

WBOY
Release: 2016-06-07 17:25:01
Original
1323 people have browsed it

Replace() 字符替换函数. 语法: REPLACE(char, search_string [, replacement_string ] ) char : 等待替换的字符串

Replace() 字符替换函数.

语法:

REPLACE(char, search_string
        [, replacement_string ]
      )

char : 等待替换的字符串

search_string : 搜索需要替换的字符串

replacement_string : 替换字符串

如果replacement_string缺省或者为null,那么所有char中出现的search_string 都将被移除

如果search_string为null,那么结果就是char

SELECT REPLACE('JACK and JUE','J','BL') "Changes"
    FROM DUAL;

Changes
--------------
BLACK and BLUE

linux

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!