Forum
Notifications
Clear all
Topic starter
MySQL provides a built-in function to replace a string or part of it.
Syntax:
repalce(str, from_str, to_str)
The MySQL replace() function will return the string str with all occurrences of the string from_str replaced by the string to_str.
The replace() performs a case-sensitive match when searching for from_str.
Example:
select replace('something', 'o', 'a');
> Will return 'samething'
Posted : 12/05/2011 2:42 pm