Обсуждение: select from table with unique values

Поиск
Список
Период
Сортировка

select from table with unique values

От
ivan
Дата:

hi

how to do select from same table to get only unique values from same
column(s) ?




Re: select from table with unique values

От
Christopher Kings-Lynne
Дата:
> how to do select from same table to get only unique values from same
> column(s) ?

SELECT DISTINCT a, b FROM tab;

or even:

SELECT DISTINCT ON (a) a, b FROM tab;

Chris