Loading lesson path
Concept visual
Start at both ends
Replace "SQL" with "HTML":
SELECT REPLACE("SQL Tutorial", "SQL", "HTML");The REPLACE() function replaces all occurrences of a substring within a string, with a new substring.
Formula
This function performs a case - sensitive replacement.string, from_string, new_string )
Required. The original string from_string Required. The substring to be replaced new_string Required. The new replacement substring
From MySQL 4.0
Replace "X" with "M":
SELECT REPLACE("XYZ FGH XYZ", "X", "M");Replace "X" with "m":
SELECT REPLACE("XYZ FGH XYZ", "X", "m");Replace "x" with "m":
SELECT REPLACE("XYZ FGH XYZ", "x", "m");❮ MySQL Functions