Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Very Simple SQL question ... hepl ? ...
Hank Griffioen <hank_at_daac.gsfc.nasa.gov> wrote in article
<34201C6E.CF4C987B_at_daac.gsfc.nasa.gov>...
> I have a table called names that has last_name and pid in
> the table. I am tryint to find a simple query that
> will all me to select all rows that have duplicated last names.
>
> something like ....
> select duplicate last_name pid from person.
>
> smith 1
> smith 3
> stevens 6
> stevens 7
>
select last_name, count(*) from person
group by last_name
having count(*) > 1;
Kevin. Received on Wed Sep 17 1997 - 00:00:00 CDT
![]() |
![]() |