Return to Snippet

Revision: 57868
at June 13, 2012 06:04 by TheNullByte


Updated Code
SELECT * 
FROM [tablename]
INNER JOIN (
SELECT COUNT( * ) , [columnOfDuplicates]
FROM [tablename]
GROUP BY [columnOfDuplicates]
HAVING COUNT( * ) >1
) AS t2 ON [tablename].[columnOfDuplicates] = t2.[columnOfDuplicates]

Revision: 57867
at June 13, 2012 03:44 by TheNullByte


Updated Code
SELECT * 
FROM [tablename]
INNER JOIN (
SELECT COUNT( * ) , [columOfDuplicates]
FROM [tablename]
GROUP BY c1/c2
HAVING COUNT( * ) >1
) AS t2 ON [tablename].[columOfDuplicates] = t2.[columOfDuplicates]

Revision: 57866
at June 13, 2012 03:41 by TheNullByte


Updated Code
SELECT * 
FROM xxxxx
INNER JOIN (
SELECT COUNT( * ) , [columOfDuplicates]
FROM xxxxx
GROUP BY c1/c2
HAVING COUNT( * ) >1
) AS t2 ON xxxxxx.[columOfDuplicates] = t2.[columOfDuplicates]

Revision: 57865
at June 13, 2012 03:02 by TheNullByte


Initial Code
SELECT * 
FROM xxxxx
INNER JOIN (
SELECT COUNT( * ) , c1, c2
FROM xxxxx
GROUP BY c1/c2
HAVING COUNT( * ) >1
) AS t2 ON xxxxxx.c1/c2 = t2.c1/c2

Initial URL

                                

Initial Description
Instead of the standard return of duplicates, this will actually show the rows that are duplicated, making it easier to see the data

Initial Title
MySQL Select duplicates

Initial Tags
mysql

Initial Language
MySQL