2008年2月28日 星期四

MySQL REPLACE 功能

update [table] set [field]=replace([field],’[str_search]’,'[str_replace]’);
今天在轉換編輯器的時候,突然多出來的需求。

for example:

update news set content=replace(content,'\n','
')

-----

沒有留言:

張貼留言