Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Rows with duplicate values.
rob nelson wrote:
>
> We have a warehouse application that allows employee identity to be
> duplicated. I need to detect when this occurs. Is there a SQL syntax for
>
> SELECT employeeid where rowcount(employeeid) > 1
>
> ?
I don't remember the exact syntax, but try something like:
SELECT DISTINCT employeeid, COUNT(*) FROM table HAVING COUNT > 1
You may also need a GROUP BY or ORDER BY employeeid clause.
--
Jerry Gitomer
Once I learned how to spell DBA, I became one.
Received on Tue Mar 07 2000 - 23:00:54 CST
![]() |
![]() |