Re: SQL to retrieve all distinct records

  • From: Mladen Gogala <mladen@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 15 Apr 2004 10:41:23 -0400

On 04/15/2004 09:38:28 AM, Alison Barak wrote:
> 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.

Me foreigner. Me have problems with English language. Me not duhveloper. 
What the heck does it mean "all three columns a,b &c  based on the distinct  of 
the two columns a & b"?  If you enlighten me and clarify the depths of your
relational thoughts, I might be able to help you. So far, from what you've
already written, I came up with the following script that is guaranteed to
to return all distinct values from the table testing based on the distinct 
values of any column, which is, in turn, based on the distinct values of all
other columns:

truncate table testing;
select * from testing;


I assure you, that this script will not return duplicate values from the table 
"TESTING",
regardless of what column you base them on and whatever the heck basing 
distinct values
on  a column is supposed to mean. One of the meaning of the word "base" is "the 
body part
used for sitting". I guess you can call me a "smart base".


-- 
Mladen Gogala
Oracle DBA
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: