Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select statement question
Say,
does anyone know of a good sql way (or do I need pl/sql?) to clean up such duplicate rows so I could instantiate a primary key if I wanted to?
Thanks
Jeff
On 18 Sep 2001 02:48:49 -0700, tony1979_at_hotmail.com (Tony) wrote:
>Hi all, I'm relatively new to SQL, and was wondering if anybody could
>help me with the following:
>
>In a select statement, if Oracle has more than 1 row that is a
>duplicate, I only want to display it once ( I'm not using primary
>keys, because nothing is neccessarily unique ).
>
>For example, a table which holds the following data:
>
>SELECT Id, Site, Equipment FROM table1 order by Id asc;
>
>ID SITE EQUIPMENT
>01 A1 switch
>01 A1 switch
>02 B1 switch
>
>Should only return row 1 and 3 ( or 2 and 3 ).
>
>Is this possible?
>
>Thanks in advance,
>
>Tony Lee, UK.
Received on Tue Oct 02 2001 - 09:23:55 CDT