r/mysql • • May 31 '26

discussion Data Cleaning in SQL!

Is data cleaning in sql tougher than excel or python?
Whenever I want to remove duplicates in sql it shows errors in my dataset!

2 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/NumerousComplex1718 May 31 '26

i believe he's saying "drop it and start over". Which sometimes is the right answer. Ultimately this all depends on your level of comfort with the tools. In SQL you'll probably need the DISTINCT keyword. If i were doing it in PHP, I'd probably create an associative array w/ the "primary key" field as the key and the record as the value.. There are a lot of ways to do this. If I recall in Excel there's a remove duplicates function buried somewhere in there