<?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>.toString() &#187; update statement</title>
	<atom:link href="http://www.dottostring.com/tag/update-statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dottostring.com</link>
	<description>Programming is our passion</description>
	<lastBuildDate>Sun, 04 Oct 2009 15:57:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using JOIN in MySQL UPDATE statement</title>
		<link>http://www.dottostring.com/2008/11/using-join-in-mysql-update-statement/</link>
		<comments>http://www.dottostring.com/2008/11/using-join-in-mysql-update-statement/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 12:59:58 +0000</pubDate>
		<dc:creator>ahsan</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[update statement]]></category>

		<guid isPermaLink="false">http://www.dottostring.com/?p=32</guid>
		<description><![CDATA[Lets assume we have a scenario where we have to update a value in one table based on the value in another table then we can use the following:
In General we can say:
UPDATE TABLE_1 INNER JOIN TABLE_2 ON TABLE_1.COLUMN_1= TABLE_2.COLUMN_2
SET TABLE_1.COLUMN = EXPR WHERE TABLE_2.COLUMN2 = EXPR
for a particular example:
UPDATE aspnet_users au INNER JOIN aspnet_usersinroles [...]]]></description>
			<content:encoded><![CDATA[<p>Lets assume we have a scenario where we have to update a value in one table based on the value in another table then we can use the following:<br />
In General we can say:</p>
<pre class="sql">UPDATE TABLE_1 INNER JOIN TABLE_2 ON TABLE_1.COLUMN_1= TABLE_2.COLUMN_2
SET TABLE_1.COLUMN = EXPR WHERE TABLE_2.COLUMN2 = EXPR</pre>
<p>for a particular example:</p>
<pre class="sql">UPDATE aspnet_users au INNER JOIN aspnet_usersinroles uir ON au.username = uir.username SET email='a'  WHERE uir.rolename ='Administrator'</pre>
<p>Hope this may help anyone</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.dottostring.com%2F2008%2F11%2Fusing-join-in-mysql-update-statement%2F';
  addthis_title  = 'Using+JOIN+in+MySQL+UPDATE+statement';
  addthis_pub    = 'erfaan';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.dottostring.com/2008/11/using-join-in-mysql-update-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
