Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0D8w4B65004 for ; Sun, 13 Jan 2002 03:58:05 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id g0D8UDO81529 for pgsql-sql@postgresql.org; Sun, 13 Jan 2002 03:30:13 -0500 (EST) (envelope-from news) From: "elisabeth maniez" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: create table with multiple unique fields Date: Sun, 13 Jan 2002 09:23:16 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 26 Message-ID: References: X-Complaints-To: news@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200201/124 X-Sequence-Number: 6213 create table T1 ( c1 int4, c2 int4, c3 int4, c4 int4, c5 int5, primary key (c1,c2,c3) ); Elisabeth "Karl Raven" a écrit dans le message news: a1agea$qap$1@news.tht.net... > > 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 > >