Tr: UNIQUE

From: Stéphane FILLON <fillons(at)offratel(dot)nc>
To: <pgsql-sql(at)postgresql(dot)org>, <pgsql-novice(at)postgresql(dot)org>
Subject: Tr: UNIQUE
Date: 1999-07-31 22:12:25
Message-ID: 001f01bedba1$c5e52920$c40a8280@portable
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>Hi !
>
>I have a table with a primary key id to have a unique tuple and
>
>I want to check that (fk_acount + code) is unique.
>
>I don't know how to create this CHECK CONSTRAINT
>
>create table amount(
> id int4 constraint pk_amount primary key,
> fk_acount int4 not null,
> code char(3) not null
>);
>
>Thanks in advance.
>
>Stephane
>
>

Browse pgsql-sql by date

  From Date Subject
Next Message Stéphane FILLON 1999-07-31 22:13:44 Tr: DUMP database for sample
Previous Message Tom Lane 1999-07-31 15:58:30 Re: [SQL] Outer Joins, Foreign keys, subselects