Re: references versus foreign keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: references versus foreign keys
Дата
Msg-id 20299.1140980760@sss.pgh.pa.us
обсуждение исходный текст
Ответ на references versus foreign keys  (Tom Allison <tallison@tacocat.net>)
Список pgsql-novice
Tom Allison <tallison@tacocat.net> writes:
> Maybe this is too much of a noob question but bear with me.
> I'm assuming that I have a choice between
> CREATE TABLE (..) REFERENCES other
> and
> CREATE TABLE (..) FOREIGN KEY () REFERENCES other
> What is the differences between the two and why/when would I choose one over the
> other?

You have to use the more verbose syntax to establish a multi-column
reference.  For single-column keys it doesn't matter which way you
do it.

            regards, tom lane

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

Предыдущее
От: Tom Allison
Дата:
Сообщение: references versus foreign keys
Следующее
От: Krishnaprasad
Дата:
Сообщение: Re: Regarding PL/SQL with C