REPLACE() in MySQL — How It Works
What the MySQL REPLACE() function does, with an example.
Published October 18, 2026
REPLACE() replaces every occurrence of a substring within a string with another substring.
Key points
- Part of standard SQL functions available in MySQL for working with text/strings
Example
SELECT REPLACE('2024-01-01', '-', '/'); -- '2024/01/01'