<?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>uRaNGaTaNG &#187; values</title>
	<atom:link href="http://www.rngtng.com/tag/values/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rngtng.com</link>
	<description>Featuring Ruby, Rails, Web development, Arduino, Processing, Nabaztag and more...</description>
	<lastBuildDate>Thu, 12 Jan 2012 10:08:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.rngtng.com/?pushpress=hub'/>
		<item>
		<title>MySQL: How to swap entires of two columns with just one query</title>
		<link>http://www.rngtng.com/2009/06/24/mysql-how-to-swap-entires-of-two-columns-with-just-one-query/</link>
		<comments>http://www.rngtng.com/2009/06/24/mysql-how-to-swap-entires-of-two-columns-with-just-one-query/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:16:29 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Happy Hacking]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[values]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=134</guid>
		<description><![CDATA[Check this out, I found out a really nice way how to swap values of two columns with just one query, using user defined variables. Given a table with two columns a and  b. To swap their values in whole, use this query:



Done! Isn't that easy?]]></description>
			<content:encoded><![CDATA[<p>Check this out, I found out a really nice way how to swap values of two columns with just one query, <a href="http://www.rngtng.com/2009/04/02/mysql-user-defined-variables-good-thing-to-know/" class="broken_link">using user defined variables</a>. Given a table with two columns <em>a</em> and  <em>b</em>. To swap their values in whole, use this query:</p>
<pre class="brush: plain; title: ; notranslate">
UPDATE my_table SET a=@tmp:=a, a=b, b=@tmp;
</pre>
<p>Done! Isn&#8217;t that easy?</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/06/24/mysql-how-to-swap-entires-of-two-columns-with-just-one-query/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

