How can I remove duplicate rows from large table

Introduction

Remove duplicate rows from large table which has more than 10,000+ rows.

DELETE FROM student 
WHERE ID NOT IN (SELECT MIN(ID) 
                    FROM student 
                    GROUP BY Col1,Col2,Col3)

 

Leave a Comment