Ever wondered how to select only rows that have some duplicate from a field? Well, here is one way that worked pretty well:
select duplicate_column from table_with_duplicates where ( select count(a.duplicate_column) from table_with_duplicates a where a.duplicate_column = table_with_duplicates.duplicate_column ) > 1 group by duplicate_column
No comments:
Post a Comment