<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Find duplicate entry in table</title>
	<atom:link href="http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 13:59:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Imran</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-33</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Thu, 18 Jun 2009 04:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-33</guid>
		<description>Sorry Elias, I was a bit busy and could not reply. 
This problem seems not to have any short cuts, at least I could not think of any :). You have to mention all the field names. Sorry that I could not heal your pain :)</description>
		<content:encoded><![CDATA[<p>Sorry Elias, I was a bit busy and could not reply.<br />
This problem seems not to have any short cuts, at least I could not think of any <img src='http://www.imranulhoque.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . You have to mention all the field names. Sorry that I could not heal your pain <img src='http://www.imranulhoque.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elias</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-28</link>
		<dc:creator>elias</dc:creator>
		<pubDate>Mon, 15 Jun 2009 06:20:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-28</guid>
		<description>Thanks Apu.But how this query will transform if I want to get all those fields from first table except one column?In that case I have to mention all other 49 columns name?Is there any method  availble  without writing any procedure?</description>
		<content:encoded><![CDATA[<p>Thanks Apu.But how this query will transform if I want to get all those fields from first table except one column?In that case I have to mention all other 49 columns name?Is there any method  availble  without writing any procedure?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-27</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Mon, 15 Jun 2009 05:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-27</guid>
		<description>Yes you could explain me and you just answered your question as well :). You can use * for the first table and column names for the required fields of the second table. So the query should look like this
&lt;code&gt;
select test1.*, test2.street, test2.city, count(*) as cnt from test1 left join test2 on( test1.id=test2.test_id) group by test1.name having cnt &gt; 1;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Yes you could explain me and you just answered your question as well <img src='http://www.imranulhoque.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . You can use * for the first table and column names for the required fields of the second table. So the query should look like this<br />
<code><br />
select test1.*, test2.street, test2.city, count(*) as cnt from test1 left join test2 on( test1.id=test2.test_id) group by test1.name having cnt > 1;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elias</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-25</link>
		<dc:creator>elias</dc:creator>
		<pubDate>Sun, 14 Jun 2009 21:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-25</guid>
		<description>thanks for your response.But this is not what I meant.Suppose,I have 2 tables tbl1 &amp; tbl2 with a foreign key reationship.tbl1 contains 50 fields where tbl2 contains 5 fields.Now I need to show all 50 columns from tbl1 and 2 columns from tbl2.But problem is that here when I wanna go for an inner join query I have to write 50 fields name in my query .rite?but is there any short cut way where I can use (*) for the first table (tbl1) and required fieds for tbl2.I think i could explain you what I am gonna mean?</description>
		<content:encoded><![CDATA[<p>thanks for your response.But this is not what I meant.Suppose,I have 2 tables tbl1 &amp; tbl2 with a foreign key reationship.tbl1 contains 50 fields where tbl2 contains 5 fields.Now I need to show all 50 columns from tbl1 and 2 columns from tbl2.But problem is that here when I wanna go for an inner join query I have to write 50 fields name in my query .rite?but is there any short cut way where I can use (*) for the first table (tbl1) and required fieds for tbl2.I think i could explain you what I am gonna mean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-23</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Sun, 14 Jun 2009 09:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-23</guid>
		<description>You can show columns of the table just by putting column names, for example,
 If a table test1 have columns id, name, phone and email, and table test2 has columns id, street, city, state and you want to find rows with duplicate names, containing fields from both tables, the query should look like this:
&lt;pre&gt;
select test1.id,test1.name, test1.phone, test1.email, test2.street, test2.city, test2.state, count(*) as cnt from test1 left join test2 on( test1.id=test2.test_id) group by test1.name having cnt &gt; 1;
&lt;/pre&gt;

P.S. This is for Mysql, but should work for any standard database.</description>
		<content:encoded><![CDATA[<p>You can show columns of the table just by putting column names, for example,<br />
 If a table test1 have columns id, name, phone and email, and table test2 has columns id, street, city, state and you want to find rows with duplicate names, containing fields from both tables, the query should look like this:</p>
<pre>
select test1.id,test1.name, test1.phone, test1.email, test2.street, test2.city, test2.state, count(*) as cnt from test1 left join test2 on( test1.id=test2.test_id) group by test1.name having cnt > 1;
</pre>
<p>P.S. This is for Mysql, but should work for any standard database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elias</title>
		<link>http://www.imranulhoque.com/mysql/find-duplicate-entry-in-table/comment-page-1/#comment-22</link>
		<dc:creator>elias</dc:creator>
		<pubDate>Sun, 14 Jun 2009 06:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.imranulhoque.com/?p=15#comment-22</guid>
		<description>How to return all columns in one table, plus a few columns in another  ?
Is there any simple way to do that?</description>
		<content:encoded><![CDATA[<p>How to return all columns in one table, plus a few columns in another  ?<br />
Is there any simple way to do that?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
