| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: GROUP BY question
If you have an index on the email column, the following SQL will be very efficient.
select a.email, a.name, a.id
from   table a
where exists (
  select null
  from   table b
  where  b.email = a.email
  and    b.id != a.id);
-- William WW LEE. E-Mail: william_at_alumni.cuhk.edu.hk ***********************************Received on Wed Oct 15 1997 - 00:00:00 CDT
![]()  | 
![]()  |