All pages
Powered by GitBook
1 of 1

Loading...

REPLACE Function

Replace occurrences of a substring. This function replaces all instances of a specified search string within a string with a replacement string.

Syntax

REPLACE(str,from_str,to_str)

Description

Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str.

Examples

This page is licensed: GPLv2, originally from

SELECT REPLACE('www.mariadb.org', 'w', 'Ww');
+---------------------------------------+
| REPLACE('www.mariadb.org', 'w', 'Ww') |
+---------------------------------------+
| WwWwWw.mariadb.org                    |
+---------------------------------------+
fill_help_tables.sql