Re: multiple PK with a non UNIQUE field - Mailing list pgsql-sql

From Mathieu Arnold
Subject Re: multiple PK with a non UNIQUE field
Date
Msg-id 416F186D0B67C67BDFA439FE@cc-171.int.t-online.fr
Whole thread Raw
In response to multiple PK with a non UNIQUE field  (davide <site.webmaster@email.it>)
List pgsql-sql

+-le 26/06/2005 16:58 +0200, davide écrivait :
| CREATE TABLE appalto (
|     cod_op         int     not null references Opere,
|     cod_com     int     not null references Opere,
|     scadenza     date     not null,
|     importo        int     not null,       PRIMARY KEY (cod_op,cod_com)
| );

You have to :
CREATE TABLE appalto (   cod_op         int     not null,   cod_com     int     not null,   scadenza     date     not
null,  importo        int     not null,   PRIMARY KEY (cod_op,cod_com),   foreign key (cod_op,cod_com) references opere
(cod_op,cod_com)
);

--
Mathieu Arnold


pgsql-sql by date:

Previous
From: davide
Date:
Subject: multiple PK with a non UNIQUE field
Next
From: "Jim Buttafuoco"
Date:
Subject: Re: multiple PK with a non UNIQUE field