Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: duplicates query
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.
Received on Thu Jul 05 2007 - 06:44:31 CDT
![]() |
![]() |