# MySql Delete Duplicates

**URL:** <https://forum.kirupa.com/t/mysql-delete-duplicates/296235>\
**Category:** programming\
**Created:** [September 11, 2009, 9:42am UTC](https://forum.kirupa.com/t/mysql-delete-duplicates/296235 "2009-09-11T09:42:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anks45](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@Anks45](https://forum.kirupa.com/u/Anks45)\
**Post date:** [September 11, 2009, 9:42am UTC](https://forum.kirupa.com/t/mysql-delete-duplicates/296235/1 "2009-09-11T09:42:19Z")

</div>

We all must have faced to delete the duplicate entries in a table.  
Here’s the simple solution to that. ![](http://www.redalkemi.com/blog/wp-includes/images/smilies/icon_smile.gif)  
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 )
