<?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: SQL Puzzle: Delete Duplicate Data without Primary key, ROW_NUMBER()	</title>
	<atom:link href="https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 14 Jan 2019 20:10:56 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>
		By: Ovidiu-Ionel Samfirescu		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6846</link>

		<dc:creator><![CDATA[Ovidiu-Ionel Samfirescu]]></dc:creator>
		<pubDate>Mon, 14 Jan 2019 20:10:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6846</guid>

					<description><![CDATA[DELETE TOP (
SELECT COUNT(*)-1 count FROM tbl_TestTable WHERE id =1 GROUP BY id, name) FROM tbl_TestTable WHERE id = 1]]></description>
			<content:encoded><![CDATA[<p>DELETE TOP (<br />
SELECT COUNT(*)-1 count FROM tbl_TestTable WHERE id =1 GROUP BY id, name) FROM tbl_TestTable WHERE id = 1</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Praful Raut		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6748</link>

		<dc:creator><![CDATA[Praful Raut]]></dc:creator>
		<pubDate>Wed, 10 Oct 2018 06:11:35 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6748</guid>

					<description><![CDATA[DELETE TOP(1)  FROM #TBL_TESTTABLE WHERE ID IN (SELECT  ID FROM #TBL_TESTTABLE GROUP BY ID HAVING COUNT(ID) &#062;=3)]]></description>
			<content:encoded><![CDATA[<p>DELETE TOP(1)  FROM #TBL_TESTTABLE WHERE ID IN (SELECT  ID FROM #TBL_TESTTABLE GROUP BY ID HAVING COUNT(ID) &gt;=3)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sadaf		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6653</link>

		<dc:creator><![CDATA[Sadaf]]></dc:creator>
		<pubDate>Wed, 29 Aug 2018 19:56:31 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6653</guid>

					<description><![CDATA[Delete from tableName
Where Field1 NOT IN (
SELECT MAX(Field1) FROM tableName
GROUP BY DuplicateField1, DuplicateField2..)]]></description>
			<content:encoded><![CDATA[<p>Delete from tableName<br />
Where Field1 NOT IN (<br />
SELECT MAX(Field1) FROM tableName<br />
GROUP BY DuplicateField1, DuplicateField2..)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lili Rad		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6560</link>

		<dc:creator><![CDATA[Lili Rad]]></dc:creator>
		<pubDate>Thu, 02 Aug 2018 08:57:49 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6560</guid>

					<description><![CDATA[This work too:

with cte as
(select *, ROW_NUMBER() over (partition by id order by id) as broj from #tbl_TestTable)
delete from cte where broj &#062; 1]]></description>
			<content:encoded><![CDATA[<p>This work too:</p>
<p>with cte as<br />
(select *, ROW_NUMBER() over (partition by id order by id) as broj from #tbl_TestTable)<br />
delete from cte where broj &gt; 1</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lili Rad		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6558</link>

		<dc:creator><![CDATA[Lili Rad]]></dc:creator>
		<pubDate>Thu, 02 Aug 2018 06:27:01 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6558</guid>

					<description><![CDATA[And this code work :-)

with cte as
(select *, ROW_NUMBER() over (partition by id order by id) as broj from tbl_TestTable)
delete from cte where broj &#062; 1]]></description>
			<content:encoded><![CDATA[<p>And this code work 🙂</p>
<p>with cte as<br />
(select *, ROW_NUMBER() over (partition by id order by id) as broj from tbl_TestTable)<br />
delete from cte where broj &gt; 1</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Arezou		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6533</link>

		<dc:creator><![CDATA[Arezou]]></dc:creator>
		<pubDate>Tue, 17 Jul 2018 09:31:24 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6533</guid>

					<description><![CDATA[Hi Mr Patel,Thank you for sharing, but i wrote this query and i got correct result.

delete from dbo.t2
where	id in
(
	Select	id
	From	dbo.t2
	Group By	Name,id
	Having count(id) &#062;1
)]]></description>
			<content:encoded><![CDATA[<p>Hi Mr Patel,Thank you for sharing, but i wrote this query and i got correct result.</p>
<p>delete from dbo.t2<br />
where	id in<br />
(<br />
	Select	id<br />
	From	dbo.t2<br />
	Group By	Name,id<br />
	Having count(id) &gt;1<br />
)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: maniva		</title>
		<link>https://www.dbrnd.com/2018/06/sql-puzzle-delete-duplicate-data-without-primary-key-row_number/#comment-6475</link>

		<dc:creator><![CDATA[maniva]]></dc:creator>
		<pubDate>Tue, 05 Jun 2018 11:46:26 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7665#comment-6475</guid>

					<description><![CDATA[thank you for sharing,]]></description>
			<content:encoded><![CDATA[<p>thank you for sharing,</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
