May 15, 2008 #1 equus2 Programmer Mar 5, 2008 36 US Hi, I have a table that has some rows with duplicate data. I want to find the duplicate data, based on 5 columns. That is, some of the rows have the same values in these 5 columns. How can I write this query? Thanks
Hi, I have a table that has some rows with duplicate data. I want to find the duplicate data, based on 5 columns. That is, some of the rows have the same values in these 5 columns. How can I write this query? Thanks
May 15, 2008 #2 SQLDenis Programmer Oct 1, 2005 5,575 US select <5 columns here> from yourtable group by <5 columns here> having count(*) > 1 Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions Upvote 0 Downvote
select <5 columns here> from yourtable group by <5 columns here> having count(*) > 1 Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions