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

Home -> Community -> Usenet -> c.d.o.misc -> Select statement question

Select statement question

From: Tony <tony1979_at_hotmail.com>
Date: 18 Sep 2001 02:48:49 -0700
Message-ID: <d458d67.0109180148.2423d443@posting.google.com>


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 Sep 18 2001 - 04:48:49 CDT

Original text of this message

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