Re: Create Foriegn Key - Mailing list pgsql-general

From Jeff Fitzmyers
Subject Re: Create Foriegn Key
Date
Msg-id 78AA7595-9894-11D7-90DE-000A959C6000@cloverpub.com
Whole thread Raw
In response to Create Foriegn Key  ("David Busby" <busby@pnts.com>)
List pgsql-general
ALTER TABLE "foreign_table_name" ADD CONSTRAINT "fkey_name" FOREIGN KEY 
("fkey_column") REFERENCES "primary_table_name"("primary_key_column_name
") ON UPDATE CASCADE ON DELETE CASCADE

(I think :-)

http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=r22871%2ehtm
http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x13546.htm

Have fun, Jeff

> List,
>     How can I create a Foriegn Key after my table is created?  I
> cannot find
> in docs (or google) anywhere.


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Create Foriegn Key
Next
From: Ron Johnson
Date:
Subject: Re: Linux 2.6 kernel, tuned for use with databases -