Re: [SQL] Duplicate rows
Bruce Stephens <bruce@cenderis.demon.co.uk>
From: Bruce Stephens <bruce@cenderis.demon.co.uk>
To: pgsql-sql@postgresql.org
Date: 1998-05-16T14:02:11Z
Lists: pgsql-sql
Andy Lewis <alewis@mpsi.net> writes: > Right, I know that there are dups in the column. But, I don't know > where they are nor do I know their value(s). I want to be able to > find, say, two interger values that are in the same column but, > different rows. How about SELECT t1.col,t1.oid, t2.oid FROM fred AS t1, fred AS t2 WHERE t1.col=t2.col AND t1.oid<t2.oid (I haven't tested this, but it's the right kind of idea: select the interesting bits from a self-join.)