Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: duplicates query
On 5 Jul, 13:44, Charles Hooper <hooperc2..._at_yahoo.com> wrote:
> On Jul 5, 6:24 am, colmkav <colmj..._at_yahoo.co.uk> wrote:
>
> > How can I return the list of duplicates that occur in a table?
>
> > For example I have 9996 distinct books in a table of 10000 records and
> > I want to know which 4 are repeated.
>
> Try GROUP BY with a HAVING clause:
>
> GROUP BY
> BOOKS.BOOK_NAME
> HAVING
> COUNT(*)>1
>
> Charles Hooper
> IT Manager/Oracle DBA
> K&M Machine-Fabricating, Inc.
thanks Received on Thu Jul 05 2007 - 07:50:04 CDT
![]() |
![]() |