Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL to retrieve all distinct records
Hi,
can someone assist me with formulating a query to retrieve all distinct
records. I need to retrieve all three columns a,b &c based on the distinct
of the two columns a & b.
SQL> select * from testing;
A B C
---------- ---------- ----------
APPS APPS R1 SYS SYS2 R2 SYS SYS2 R3 DOC DOC2 R4 DC DC2 R5 DOC DOC R6 The result should be A B C
---------- ---------- ----------
APPS APPS R1 SYS SYS2 R2 DOC DOC2 R4 DC DC2 R5 DOC DOC R6
I tried using group by/having count but was not successful. Any idea?
Thanks.
alison
![]() |
![]() |