From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | Cedar Cox <cedarc(at)visionforisrael(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: REFERENCES constraint |
Date: | 2001-08-08 16:30:43 |
Message-ID: | web-98848@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Grigoriy G. Vovk | 2001-08-08 17:21:51 | Re: Functions returning more than one value |
Previous Message | Josh Berkus | 2001-08-08 16:29:17 | Re: REFERENCES constraint |