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: identical columns

Re: identical columns

From: Joe Brown <NoSpamMeVeryMuch_at_leading.net>
Date: Tue, 15 Sep 1998 14:22:10 GMT
Message-ID: <35fe7749.61139724@news.leading.net>


I've found the group by clause is useful for this..

select mycol, mycount from
  (select mycol, count(mycol) mycount from mytable    group by mycol) -- I suppose you can group by all columns here. where mycount > 1;

"José Nicolau" <jnicolau_at_hotmail.com> wrote:

> Try this
>
> select *
> from table t1
> where exists (select 0
> from table t2
> where t2.columns_with_duplicates = t1.columns_with_duplicates
> and t2.rowid != t1.rowid)
>
> You may use 'select distinct *...'
>
> Corinna Becker wrote:
>
> > Hello,
> > I have the following problem: I have a table of which I know that it
> > contains duplicate rows. I want to find all rows that are duplicate.
> > How can I do that?
> > Regards and thanks
> > Corinna Becker
>
>
>

--
joebrown
@leading.net Received on Tue Sep 15 1998 - 09:22:10 CDT

Original text of this message

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