UPDATE post SET pagetext = REPLACE(pagetext, 'olddomain.com', 'newdomain.com') WHERE pagetext LIKE '%olddomain.com%'