Re: create table with multiple unique fields

From: "elisabeth maniez" <emaniez(at)caramail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: create table with multiple unique fields
Date: 2002-01-13 08:23:16
Message-ID: a1rgih$2fjj$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

create table T1 ( c1 int4, c2 int4, c3 int4, c4 int4, c5 int5, primary
key (c1,c2,c3) );

Elisabeth
"Karl Raven" <lcaasia(at)pd(dot)jaring(dot)my> a crit dans le message news:
a1agea$qap$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
>
> I'd like to create a table with 3 create unique fields :
>
> fields
> warehouseno,loc, productid, qty, qtyalllocated
>
> i'd like warehouseno,loc, productid to be unique..
> meaning
> 2000, ABC, X - ok
> 2000,ABC,Y -ok
> 2000,ABC,X - reject
> 2000,BCD,X - ok
>
> anyone knows how to do so?
>
> thanks
>
>

Browse pgsql-sql by date

  From Date Subject
Next Message Unnikrishnan Menon 2002-01-13 14:37:27 Problems with PL/PGSQL - functions
Previous Message Murray Prior Hobbs 2002-01-12 22:54:07 Re: triggered data change violation