Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DISTINCT
On 20-Apr-98 15:51:31 Min Wang wrote:
>How to use distinct in query?
>Let's say there is table A
>X Y Z
>--------
>1 2 3
>1 2 4
>1 3 3
>How to get distinct X, Z when query Z=3? Say, we just want show (1, 3)
>instead of (1,3), (1,3).
>Thanks.
Hello,
try this:
select distinct x,z from a
where z=3;
Hope that helps,
Lothar
--
Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Mon Apr 20 1998 - 14:37:16 CDT