取代字串函式
REPLACE( str,from_str,to_str)
mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
-> 'WwWwWw.mysql.com'
This function is multi-byte safe.
update table set field = replace( field , 'targetStr' , 'replaceToStr') where field like 'condition';
沒有留言:
張貼留言