RE: SQL question: Finding duplicates

2004-02-03 Thread Russell Horn
> > row | foo > 1 | a > 2 | c > 3 | b > 4 | c > 5 | a > 6 | d > > the statement would return me rows 1, 2, 4, and 5. > CREATE TEMPORARY TABLE temptable SELECT * FROM test GROUP BY foo HAVING COUNT( * ) >1 ORDER BY foo ASC ; SELECT * FROM test, temptable WHERE test.foo = temptable.f

SQL question: Finding duplicates

2004-02-03 Thread Simon Detheridge
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Disclaimer: I'm not an SQL expert so please don't laugh. ;-) I'm trying to generate a way to find all rows from a table where the data in column 'foo' is a duplicate of the data in another row. I.E.: row | foo 1 | a 2 | c 3 | b 4 | c 5 |