<?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>birghtyoursite &#187; mysql</title>
	<atom:link href="http://www.brightyoursite.com/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightyoursite.com/blog</link>
	<description>Bright your site</description>
	<lastBuildDate>Mon, 19 Dec 2011 09:39:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>delete specific column duplicate  data  in mysql</title>
		<link>http://www.brightyoursite.com/blog/2010/05/23/delete-specific-column-duplicate-data-in-mysql/</link>
		<comments>http://www.brightyoursite.com/blog/2010/05/23/delete-specific-column-duplicate-data-in-mysql/#comments</comments>
		<pubDate>Sun, 23 May 2010 17:09:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.brightyoursite.com/blog/?p=401</guid>
		<description><![CDATA[I have a mysql table site_visitor with vid(auto_increment),IP,page,visit_time&#8230; columns, the problem is many duplicate IP data in the table, only the IP column data is duplicated while the others like isp,visit_time&#8230; are not, i did much test and finally find a very simple way. delete specific column duplicate data in mysql DELETE duplicate_rows.* FROM site_visitor [...]]]></description>
			<content:encoded><![CDATA[<p>
I have a mysql table  site_visitor with vid(auto_increment),IP,page,visit_time&#8230;  columns, the problem is many duplicate IP data in the table, only the IP column data is duplicated while the others like isp,visit_time&#8230; are not, i did much test and finally find a very simple way.
</p>
<p><span id="more-401"></span></p>
<h3>delete specific column duplicate  data  in mysql </h3>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> duplicate_rows<span style="color: #66cc66;">.*</span>
<span style="color: #993333; font-weight: bold;">FROM</span> site_visitor <span style="color: #993333; font-weight: bold;">AS</span> single_rows
   <span style="color: #993333; font-weight: bold;">INNER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> site_visitor  <span style="color: #993333; font-weight: bold;">AS</span> duplicate_rows <span style="color: #993333; font-weight: bold;">ON</span> duplicate_rows<span style="color: #66cc66;">.</span>IP<span style="color: #66cc66;">=</span> single_rows<span style="color: #66cc66;">.</span>IP
      <span style="color: #993333; font-weight: bold;">AND</span> duplicate_rows<span style="color: #66cc66;">.</span>vid<span style="color: #66cc66;">&gt;</span> single_rows<span style="color: #66cc66;">.</span>vid;</pre></div></div>

<p>just run those mysql codes via phpmyadmin or via php query, you will see it&#8217;s a magic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brightyoursite.com/blog/2010/05/23/delete-specific-column-duplicate-data-in-mysql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

