<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>database Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<atom:link href="https://stampede-design.com/blog/tag/database/feed/" rel="self" type="application/rss+xml" />
	<link>https://stampede-design.com/blog/tag/database/</link>
	<description>We are creating better worlds though thoughtful design and technology. Connect with us!</description>
	<lastBuildDate>Tue, 07 Apr 2026 09:09:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://stampede-design.com/wp-content/uploads/2024/02/cropped-Stampede-Favicon-old-32x32.png</url>
	<title>database Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<link>https://stampede-design.com/blog/tag/database/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Useful MySQL Query for Search and Replace</title>
		<link>https://stampede-design.com/blog/useful-mysql-query-for-search-and-replace/</link>
					<comments>https://stampede-design.com/blog/useful-mysql-query-for-search-and-replace/#respond</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Sat, 13 Mar 2010 07:01:26 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=399</guid>

					<description><![CDATA[<p>When working with databases, one of the tasks that may popped up every once in a while is the need to replace some little snippet of text and all its occurrence throughout the table, to a different text. If you need to perform a quick search and replace on your MySQL database records, Shaiful reassures that you should just take a seat and read on, casually. No biggie.</p>
<p>The post <a href="https://stampede-design.com/blog/useful-mysql-query-for-search-and-replace/">Useful MySQL Query for Search and Replace</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead">When working with databases, one of the tasks that may popped up every once in a while is the need to replace some little snippet of text and all its occurrence throughout the table, to a different text. Simple enough to do manually, but too time-consuming. Thankfully, there&#8217;s a handy query to make this task a breeze.</p>
<pre class="brush: php; title: ; notranslate">
UPDATE `table_name` SET `field_name`= REPLACE (`field_name`, 'search for', 'replace to');
</pre>
<p>The query is pretty self-explanatory. As with all UPDATE operation, you can add a WHERE clause to have more control over the outcome of the query.</p>
<p>The most common scenario where I found this to be useful is when moving a WordPress installation from a development server over into a live server, where I have to replace all occurrence of the former URL to the latter in order to ensure images in posts are pointing correctly. Here&#8217;s how the query may look.</p>
<pre class="brush: php; title: ; notranslate">
UPDATE `wp_posts` SET `post_content`= REPLACE (`post_content`, 'http://devserver.com/', 'http://liveserver.com/');
</pre>
<p>Just run it using your favorite database admin tool and you&#8217;ll be glad in no time. Have a nice day!</p>
<p>The post <a href="https://stampede-design.com/blog/useful-mysql-query-for-search-and-replace/">Useful MySQL Query for Search and Replace</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/useful-mysql-query-for-search-and-replace/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
