Re: no dup rows

Поиск
Список
Период
Сортировка
От Bill Harper
Тема Re: no dup rows
Дата
Msg-id 410E9086.3060204@solutionst.com
обсуждение исходный текст
Ответ на no dup rows  (Jodi Kanter <jkanter@virginia.edu>)
Список pgsql-admin
Jodi Kanter wrote:

> I have a linking table that has only two fields in it and both are
> foreign keys to other tables. I'd like to ensure that there are never
> any duplicate rows in this table. I was planning on creating a
> multi-column unique index to satisfy this requirement. Is there a more
> appropriate way to accomplish this or am I on the right track?>
> thanks.
> Jodi
> --
>
> /_______________________________
> //Jodi L Kanter
> BioInformatics Database Administrator
> University of Virginia
> (434) 924-2846
> jkanter@virginia.edu <mailto:jkanter@virginia.edu100>/
>
>
>
Just create a primary key on the two columns, that way you get
uniqueness and not null constraints.

-bill


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: no dup rows
Следующее
От: Reece Hart
Дата:
Сообщение: Re: no dup rows