Showing posts with label replace function in mysql. Show all posts
Showing posts with label replace function in mysql. Show all posts

Tuesday, 17 July 2012

Mysql replace() function

REPLACE(str1,fromStr,toStr)
Returns str with all occurrences of the string from the fromStr and replaced by the string toStr. REPLACE() is a case sensitive match when it searches str for the fromStr.
SELECT REPLACE('www.test.com', 'w', 'Ww'); o/p: 'WwWwWw.mysql.com'