Re: How to do this query?
From: pconnors on BIX <pconnors_at_BIX.com>
Date: 1995/04/20
Message-ID: <pconnors.798342749_at_BIX.com>#1/1
Date: 1995/04/20
Message-ID: <pconnors.798342749_at_BIX.com>#1/1
5603liul_at_vms.csd.mu.edu writes:
>Dear netters:
> I wonder how I can do this query?
> Assume I have a table, say A. In A, there are two columes,
>Say, B, C. Let's assmue it looks like this.
> B C
> --- ---
> 1 2
> 2 3
> 3 3
> 4 6
> How can we find the columns with duplicate C's? Here,
>it is (2,3) and (3,3).
> Thanks.
> David
select a.b, a.c from a
where exists (select x.c from a x
where x.rowid > a.rowid and a.c = x.c )
... should do the trick.
-Pat Connors Received on Thu Apr 20 1995 - 00:00:00 CEST