Re: Create Foriegn Key

From: Jeff Fitzmyers <jeff(at)cloverpub(dot)com>
To: "David Busby" <busby(at)pnts(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Create Foriegn Key
Date: 2003-06-07 03:02:27
Message-ID: 78AA7595-9894-11D7-90DE-000A959C6000@cloverpub.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-06-07 03:15:02 Re: Create Foriegn Key
Previous Message Mark Wilson 2003-06-07 02:22:44 Re: Create Foriegn Key