Home  >  Article  >  Database  >  Oracle函数之Replace()

Oracle函数之Replace()

WBOY
WBOYOriginal
2016-06-07 17:25:011324browse

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

Statement:
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