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: Selecting Duplicates ???

Re: Selecting Duplicates ???

From: Philippe <parnaud_at_yahoo.com>
Date: Fri, 9 Apr 1999 08:53:11 +0200
Message-ID: <7ek87m$o73$1@concorde.ctp.com>


If col1 is the duplicated column:

select col1, count(col1) from YourTable group by col1 having count(col1) > 1

hth
Philippe

Richard Elliott wrote in message <370D5BF7.E5722B0A_at_flash.net>...
>I thought I had a simple request the other day, turned out I couldn't do
>it with a select, had to write a small pl/sql block. I needed to select
>a list of duplicates in a single table. I thought "minus" would do it
>but not so ! I looked in every source of SQL/Oracle documentation I have
>( a lot !) and no mention of how to identify duplicates. I know the key
>of a table can be used to keep duplicates from existing but these are
>duplicates based on other columns.
>Anybody have the answer ? I like to solve these request with SQL selects
>if possible because I can give the SQL to the user and he can run it
>himself using ODBC if he needs to later.
>
>
Received on Fri Apr 09 1999 - 01:53:11 CDT

Original text of this message

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