Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: A simple sql*plus question

Re: A simple sql*plus question

From: Allison Weaver <aweaver_at_nova.umuc.edu>
Date: 1997/02/07
Message-ID: <Pine.GSO.3.95.970207145647.26682C-100000@nova>#1/1

On 7 Feb 1997, Brian Cameron wrote:

> I need to select from a table where two columns are duplicated. I know
> this may be really simple but if someone can help me out I'd appreciate
> it.
>
> eg. select a,b from table where a and b are duplicated (occur in more than
> one row)

This worked on my system...

select count(*), a, b
  from table
 where a = b
 group by a, b
having count(*) > 1;

Allison Received on Fri Feb 07 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US