<?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>Agence de Développement Informatique du Nord &#187; optimization</title>
	<atom:link href="http://blog.adin.pro/tag/optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Mysql INSERT &#8230; ON DUPLICATE KEY UPDATE</title>
		<link>http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/</link>
		<comments>http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 22:37:01 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=160</guid>
		<description><![CDATA[<p>If you want to do some data loads in a Mysql DB regardless of insert or update statement you can use the INSERT &#8230; ON DUPLICATE KEY UPDATE request. In this example, if the key is composed by firstname and &#8230; <a href="http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/">Mysql INSERT &#8230; ON DUPLICATE KEY UPDATE</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you want to do some data loads in a Mysql DB regardless of insert or update statement you can use the INSERT &#8230; ON DUPLICATE KEY UPDATE request.</p>
<pre class="brush: php; title: ; notranslate">
INSERT INTO test (firstname, lastname, skill)
      VALUES
      ('Alan', 'Cox', 98),
      ('Robert', 'Love', 85),
      ('Linus', 'Torvalds', 24),
      ('Rusty', 'Russell', 79)
ON DUPLICATE KEY UPDATE
     skill = VALUES(skill);
</pre>
<p>In this example, if the key is composed by firstname and lastname, when a duplicate key is detected, only the skill will be updated</p>
<p>You could find more informations on this statement <a title="Insert on duplicate key update" href="http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html" target="_blank">here</a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/">Mysql INSERT &#8230; ON DUPLICATE KEY UPDATE</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-03-27/mysql-insert-on-duplicate-key-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
