MySql Delete Duplicates
September 10, 2009 – 10:09 pmWe all must have faced to delete the duplicate entries in a table.
Here’s the simple solution to that.
The scenario is:
The table has 3 columns, A, B, and C. Column A is unique for all rows
but the columns B and C can be duplicated across rows. Now if you need
to remove the rows where B and C are duplicated.
DELETE
FROM daTable
WHERE a NOT IN
( SELECT MIN(a)
FROM daTable
GROUP
BY b,c )


2 Responses to “MySql Delete Duplicates”
useful query
By Ashutosh on Nov 5, 2009
Thank you for appreciating. Keep reading for new updates…
By RedAlkemi on Oct 20, 2010