distinct

From: "Otwell, Andrew (ISSAtlanta)" <AOtwell(at)iss(dot)net>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: distinct
Date: 2000-10-03 20:35:36
Message-ID: DF3CC311E898D311A3670008C709BD2302A110C6@msgatl01.iss.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have attempted to run
select distinct col1 from tablename;
and it runs fine.

When I run it in a real world environment:
select distinct col1, col2, col3, col4 from tablename order by col1 desc,
col2;
It returns all the values from col1 which appears to be the same thing as
not using distinct at all.

Am I missing something? I'd like only distinct values on col1 and then I'll
sort, include, or exclude the other columns.

Andrew

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nathan Boeger 2000-10-03 20:37:48 AIX compile ?? libcrypt HELP !!
Previous Message Ross J. Reedstrom 2000-10-03 19:24:49 Re: Memory bloating