Re: SQL question

From: Kenny Gump <kgump_at_mylanlabs.com>
Date: Fri, 21 May 1999 07:12:32 -0400
Message-ID: <37453f89.0_at_news.mountain.net>


select distinct A, B, C
from test.t

where t.a = 'A'
and t.b = 'B'
and t.c = '1';

This will return only one row.

Kenny Gump
OCP 7.3 DBA Ken Halsted wrote in message <927239162.115.33_at_news.remarQ.com>...
>I am wondering if there is a way to ensure that only 1 row of information
>get's returned in a Query?
>
>For example if a table (test) exists like:
>
>A VARCHAR2(1)
>B VARCHAR2(1)
>C VARCHAR2(1)
>D VARCHAR2(1)
>E VARCHAR2(1)
>
>A, B, C, D make up the key.
>
>Select *
>From test t
>where t.a = 'A'
>and t.b = 'B'
>and t.c = '1'
>
>I only want one row to be returned even if there are more than one type of
D
>information. I only want to see the unique rows of C for every A and B.
>
>How can I do this easily?
>
>Thanks for any help at all.
>
>Ken Halsted.
>
>--
>_________________
>Kenneth W. Halsted
>Mountaire Corporation
>ph: (501) 399-8812
>url: http://www.mountaire.com
>email: kenman_at_mail.snider.net
>
>
>
Received on Fri May 21 1999 - 13:12:32 CEST

Original text of this message