Re: REFERENCES constraint

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: REFERENCES constraint
Дата
Msg-id web-98848@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на REFERENCES constraint  (Cedar Cox <cedarc@visionforisrael.com>)
Список pgsql-sql
Cedar,

(sorry for the double posting, folks)

> 2. Can a column reference another column in the same table?  eg..
> 
>   CREATE TABLE bloo (
>     id int4,
>     p_id int4 REFERENCES bloo (id)
>   -- or
>   --p_id int4 REFERENCES (id)
>   )

You don't do this with REFERENCES ... you do it with a CHECK CONSTRAINT
(look it up in the docs).

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


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

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Functions returning more than one value
Следующее
От: "Grigoriy G. Vovk"
Дата:
Сообщение: Re: REFERENCES constraint