REPLACE(str,from_str,to_str): Replace str with all occurrences of from_str to_str : REPLACE « String Functions « MySQL Tutorial






REPLACE() performs a case-sensitive match when searching for from_str.

mysql>
mysql>
mysql> SELECT REPLACE('www.java2s.com', 'w', 'W');
+-------------------------------------+
| REPLACE('www.java2s.com', 'w', 'W') |
+-------------------------------------+
| WWW.java2s.com                      |
+-------------------------------------+
1 row in set (0.00 sec)

mysql>








23.33.REPLACE
23.33.1.REPLACE(str,from_str,to_str): Replace str with all occurrences of from_str to_str
23.33.2.Use replace function with data in a table
23.33.3.Replace letter J in the first name to letter G