Quick SQL question . . .

Поиск
Список
Период
Сортировка
От Peter E. Chen
Тема Quick SQL question . . .
Дата
Msg-id JBEOIGCPFENBBBIKPPLCCEFLCEAA.pchen3@jhmi.edu
обсуждение исходный текст
Ответы Re: Quick SQL question . . .  ("Marie G. Tuite" <marie.tuite@edisonaffiliates.com>)
Список pgsql-general
Can anyone tell me what is the easiest way for me to tell if a column is
unique or not?  I tried using DISTINCT ON and COUNT together in a SELECT
statement, but I can't seem to get the query to work:

SELECT DISTINCT ON (identno) count(identno) FROM some_table;

I was trying to figure out if the # of unique entries for a particular
column is equal to the # of total entries for that column.

Any suggestions?

Peter




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Psql 7.2.1 Regress tests failed on RedHat 7.3
Следующее
От: Fran Fabrizio
Дата:
Сообщение: Re: Quick SQL question . . .