String Replace in MYSQL Table

by Nirmala 2010-07-31 12:48:13

String Replace in MYSQL Table:
Use the below syntax to replace particular column value in your table for all records.
Update tablename set columnname=replace(columnname, string,replacestring)

Example:
I want to replace url column in my table. Replace 'http://www.' to 'http://'
update rating set url=replace(url,'http://www.','http://')

Tagged in:

1078
like
0
dislike
0
mail
flag

You must LOGIN to add comments