Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to select a 'not unique' field?
In article <91boqe$o5i$1_at_nnrp1.deja.com>,
susana73_at_hotmail.com wrote:
> I have a table called OBJECT and with RESULTID column. The RESULTID
> column is not a PK and is not necessarily be unique. How can I SELECT
> all the id that is NOT UNIQUE?
>
> Thanks!
> Susan
>
> Sent via Deja.com
> http://www.deja.com/
>
Strange data organization....
This should get all the resultid that have more than 1 row. If the table is big, runtime will be long.
select resultid
from OBJECT
group by resultid
having count(resultid) > 1
-- Michael Krolewski Rosetta Inpharmatics mkrolewski_at_rosetta.org Usual disclaimers Sent via Deja.com http://www.deja.com/Received on Thu Dec 14 2000 - 18:51:42 CST