This is a discussion on how to retrieve only the duplicates in a table within the SQL Server forums, part of the Microsoft SQL Server category; --> There is a table with a single column with 75 rows - 50 unique / 25 duplicates. How would ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| There is a table with a single column with 75 rows - 50 unique / 25 duplicates. How would pull back a list of the rows that have/are duplicates? This is a question that I got in an interview. I didn't get it, obviously.... Thanks, Tim |
| ||||
| SELECT col1, col2, col3, .... FROM Sometable GROUP BY col1, col2, col3, .... HAVING COUNT(*)>1 -- David Portas ------------ Please reply only to the newsgroup -- "TimG" <timgru@hotmail.com> wrote in message news:744d8a29.0311072031.75846c64@posting.google.c om... > There is a table with a single column with 75 rows - 50 unique / 25 > duplicates. How would pull back a list of the rows that have/are > duplicates? > > This is a question that I got in an interview. I didn't get it, > obviously.... > > Thanks, > > Tim |
| Thread Tools | |
| Display Modes | |
|
|