1

Just managed to install WordPress on SQL 2008 R2. How to find and replace strings (URLs) in dbo.wp_posts table, post_content column?

Looking for a way to replace http://localhost/ with http://somedomain.com

Any suggestions much appreciated.

4

1 回答 1

1

使用REPLACE

UPDATE dbo.wp_post
SET post_content = 
    REPLACE(post_content, 'http://localhost/', 'http://somedomain.com');
WHERE ... --predicatehere
于 2012-09-18T11:55:12.230 回答