Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Select rows where field value is the same

Re: Select rows where field value is the same

From: Marc Mazerolle <informaze_at_sympatico.ca>
Date: Wed, 26 May 1999 18:05:21 GMT
Message-ID: <374C3902.D14A893@sympatico.ca>


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

Original text of this message

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