Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select rows where field value is the same
I love those SQL questions....
How about :
select distinct empno
from emp a
where exists (
select 1 from emp b
where a.empno = b.empno
and a.rowid <> b.rowid)
Regards,
Marc Mazerolle
InforMaze Inc.
analyst_user_at_my-deja.com wrote:
> I'm fairly new to Oracle so I'm having a problem with something I want
> to do.
>
> I have a field called EMPNO in a fairly large table. I want to return
> all rows where the value of EMPNO repeats.
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
Received on Wed May 26 1999 - 13:05:21 CDT
![]() |
![]() |