| From: | Darren Ferguson <darren(at)crystalballinc(dot)com> |
|---|---|
| To: | Angela Luyf <a(dot)c(dot)luyf(at)amc(dot)uva(dot)nl> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: two primairy key in one table ? |
| Date: | 2002-07-05 15:28:09 |
| Message-ID: | Pine.LNX.4.44.0207051127240.2982-100000@thread.crystalballinc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
CREATE TABLE foo (
id1 INTEGER NOT NULL,
id2 INTEGER NOT NULL,
CONSTRAINT foo_pk PRIMARY KEY(id1,id2)
);
HTH
On Thu, 4 Jul 2002, Angela Luyf wrote:
> Hello,
> I have a database model where a many to many relation is used, so i need
> to create a table with two primary key. Don't know how to solve this in
> postgress, can't find it in the tutorials, so can anybody help me with
> this ?
>
> A. Luyf
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
--
Darren Ferguson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-07-05 15:35:38 | Re: explicit cast error |
| Previous Message | David A Dickson | 2002-07-05 15:19:33 | Re: two primairy key in one table ? |