Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL to retrieve all distinct records
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_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Apr 15 2004 - 10:44:20 CDT
![]() |
![]() |