<?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>Um-byte &#187; POG</title>
	<atom:link href="http://umbyte.com/category/pog/feed/" rel="self" type="application/rss+xml" />
	<link>http://umbyte.com</link>
	<description>Informações em 8 bits</description>
	<lastBuildDate>Fri, 25 Feb 2011 14:31:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Como selecionar registros duplicados em uma tabela SQL</title>
		<link>http://umbyte.com/2008/05/como-selecionar-registros-duplicados-em-uma-tabela-sql/</link>
		<comments>http://umbyte.com/2008/05/como-selecionar-registros-duplicados-em-uma-tabela-sql/#comments</comments>
		<pubDate>Thu, 22 May 2008 16:38:00 +0000</pubDate>
		<dc:creator>Kellsens Willamos</dc:creator>
				<category><![CDATA[POG]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://umbyte.com/?p=6</guid>
		<description><![CDATA[Tudo bem, eu sei que vai parecer gambiarra. E é isso mesmo ! Mas na hora do desespero o jeito é &#8216;chutar o pau da barraca&#8217;. Então, taí : SELECT * FROM tabela t1 WHERE EXISTS ( SELECT * FROM tabela t2 WHERE t2.campo = t1.campo GROUP BY campo HAVING COUNT(*) &#62; 1 ) ORDER [...]]]></description>
			<content:encoded><![CDATA[<p>Tudo bem, eu sei que vai parecer gambiarra. E é isso mesmo ! Mas na hora do desespero o jeito é &#8216;chutar o pau da barraca&#8217;. Então, taí :</p>
<p><em>SELECT * FROM tabela t1 WHERE EXISTS ( SELECT * FROM tabela t2 WHERE t2.campo = t1.campo GROUP BY campo HAVING COUNT(*)  &gt; 1 ) ORDER BY lista de campos</em></p>
<p>Ou então:</p>
<p><em>SELECT * FROM tabela WHERE campo IN ( SELECT campo FROM tabela GROUP BY campo HAVING count(*)  &gt; 1) ORDER BY lista de campos</em></p>
<p>Isso já me salvou tantas vezes&#8230;</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://umbyte.com/2008/05/como-selecionar-registros-duplicados-em-uma-tabela-sql/' addthis:title='Como selecionar registros duplicados em uma tabela SQL ' ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>]]></content:encoded>
			<wfw:commentRss>http://umbyte.com/2008/05/como-selecionar-registros-duplicados-em-uma-tabela-sql/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

