distinct

Поиск
Список
Период
Сортировка
От andrew@networkcomputerz.com
Тема distinct
Дата
Msg-id 200010032111.RAA13805@web2.america.net
обсуждение исходный текст
Ответы Re: distinct  (bmccoy@chapelperilous.net)
Список 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@networkcomputerz.com
http://www.NetworkComputerz.com




В списке pgsql-general по дате отправления:

Предыдущее
От: "Sean Carmody"
Дата:
Сообщение: RE: Fw: Talking with other Dbases.
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Fake table name?