Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: duplicate rows in big table
In article <G04B63.4HD_at_news.boeing.com>,
"James" <jialong.x.xie_at_boeing.com> wrote:
> I have a table, which has more than one million rows but a few
duplicates.
> Is there any quick way to single out these duplicates? The normal way
that
> compares rowid by rowid is too time consuming. Any help will be
appreciated.
>
> James
>
PICK OUT A COLUMN THAT WILL IDENTIFY ROWS EASILY. THEN TRY THIS:
SELECT COLUMN1, COUNT(ROWID)
FROM TABLE_WITH_DUPES
GROUP BY COLUMN1
HAVING COUNT(COLUMN1) > 1;
HTH,
Eoin
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Aug 30 2000 - 14:42:13 CDT