bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL REPLACE() Function

Example

SELECT REPLACE("SQL Tutorial", "SQL", "HTML");

Definition and Usage

The REPLACE() function replaces all occurrences of a substring within a string, with a new substring.

Note

This function performs a case-sensitive replacement.

Syntax

REPLACE(
string
,
from_string
,
new_string
)

Parameter Values

ParameterDescription
stringRequired. The original string
from_stringRequired. The substring to be replaced
new_stringRequired. The new replacement substring

Technical Details

Works in:From MySQL 4.0

Previous

MySQL REPEAT() Function

Next

MySQL REVERSE() Function