Sunday, March 3, 2013

Replace a text with something else by a SQL Query

Syntax :

UPDATE Table SET Column = Replace(Column, 'find value', 'replacement value') WHERE xxx


Example :

UPDATE `links` set url = replace (url,'http://www.google.com','http://www.yahoo.com') where url != ''

No comments:

Post a Comment