distinct

From: andrew(at)networkcomputerz(dot)com
To: pgsql-general(at)postgresql(dot)org
Cc: andrew(at)networkcomputerz(dot)com
Subject: distinct
Date: 2000-10-03 21:11:51
Message-ID: 200010032111.RAA13805@web2.america.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

Andrew Otwell, UNIX/NT SysAdmin
andrew(at)networkcomputerz(dot)com
http://www.NetworkComputerz.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nathan Boeger 2000-10-03 21:28:42 Re: AIX compile ?? libcrypt HELP !!
Previous Message Peter Eisentraut 2000-10-03 21:08:12 Re: AIX compile ?? libcrypt HELP !!