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'

No comments:

Post a Comment