From: "Nascar" <nascar@flash.net>
Newsgroups: comp.databases.oracle.misc
References: <BGiu5.1236$En.524404@news02.optonline.net>
Subject: Re: Select nonDistinct?
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Message-ID: <4Osu5.801$oc3.77345@news.flash.net>
Date: Sat, 09 Sep 2000 15:36:32 GMT
NNTP-Posting-Host: 63.254.25.93
X-Complaints-To: abuse@flash.net
X-Trace: news.flash.net 968513792 63.254.25.93 (Sat, 09 Sep 2000 10:36:32 CDT)
NNTP-Posting-Date: Sat, 09 Sep 2000 10:36:32 CDT
Organization: FlashNet Communications, http://www.flash.net


if ID is the column you want to see dupes for:

select id from dasilva_table
group by id having count(*) > 1

"Luiz da Silva" <big57arf@optonline.com> wrote in message
news:BGiu5.1236$En.524404@news02.optonline.net...
> Hi all,
>
> My first question to the group.
>
> I know that I can use Select Distinct ... to return non-duplicate rows in
 a
> table, but is there any way to bring back only the rows that are
 duplicated.
> By this I mean, suppose my table looks something like this:
>
> id_number     name
> 1             Lou da Silva
> 2             Fred da Silva
> 1             Alan da Silva
> 3             Figaro da Silva
> 4             Felix da Silva
> 2             Pendejo da Silva
>
> SELECT DISTINCT Id_Number FROM Dasilva_Table;
>
> will bring back
>
> id_number
> 1
> 2
> 3
> 4
>
> What I would like to do is something like this:
>
> SELECT NONDISTINCT Id_Number FROM Dasilva_Table;
>
> and get back:
>
> id_number
> 1
> 2
>
> Thanks in advance and thanks for all the help you've provided indirectly
 to
> me by replying to other people's questions.
>
>
>
>
>
>



