Re: Add Primary/Foreign Key in 7.3.2

From: Melanie Bergeron <mbergeron_pg(at)globeecom(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Add Primary/Foreign Key in 7.3.2
Date: 2003-12-22 21:48:29
Message-ID: 3FE766AD.6090207@globeecom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can do this by doing
ALTER TABLE mytable
ADD CONSTRAINT myconstraint FOREIGN KEY (table_id) REFERENCES
myothertable(table_id);

Melanie

Brian C. Doyle wrote:

> Hello all,
>
> I was wondering if there is any way to add a primary and/or foreign
> keys to existing tables in 7.3.2
>
>
> ------------------------------------------------------------------------
>
> Brian C. Doyle
> Director, Internet Services
> United Merchant Processing Association
> http://www.umpa-us.com
> 1-800-555-9665 ext 212

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2003-12-22 22:05:40 Re: restoring database
Previous Message Melanie Bergeron 2003-12-22 21:37:51 CHECK versus a Table for an enumeration