Skip site navigation (1) Skip section navigation (2)

Re: Dual Primary keys

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bantamess <bantamess(at)yahoo(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Dual Primary keys
Date: 2004-02-04 15:35:18
Message-ID: 20040204153518.GA20727@wolff.to (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, Feb 04, 2004 at 15:15:45 -0000,
  Bantamess <bantamess(at)yahoo(dot)co(dot)uk> wrote:
> Hello can any body tell me how to code a table with dual primary keys? The table 'borrower' has two PKs each one has been used in other tables within the same schema as single PKs

Use UNIQUE and NOT NULL constraints on one of the two keys. In references
to that key, you will need to specify the column name as the default
column name is the primary key.

In response to

pgsql-novice by date

Next:From: Tom LaneDate: 2004-02-04 16:22:06
Subject: Re: Dual Primary keys
Previous:From: BantamessDate: 2004-02-04 15:15:45
Subject: Dual Primary keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group