Re: primary keys - Mailing list pgsql-sql

From Rachel.Vaudron
Subject Re: primary keys
Date
Msg-id Pine.LNX.4.33.0211071459290.10443-100000@lazaret.unice.fr
Whole thread Raw
In response to primary keys  (Huub <v.niekerk@freeler.nl>)
List pgsql-sql
Hi,

For example you can do something like that:

CREATE TABLE "try" (       "field1"        TEXT NOT NULL,       "field2"        INT4 NOT NULL,"field3"    TEXT, PRIMARY
KEY(field1, field2));
 

**************************************  Rachel.Vaudron@lazaret.unice.fr
Laboratoire de prehistoire du Lazaret33 bis bd Franck Pilatte 06300 Nice
tel:04-92-00-17-37/fax:04-92-00-17-39
******** Windows a bug's life ********

On Wed, 6 Nov 2002, Huub wrote:

> Hi,
>
> I want to create a table which has 2 columns, and both columns have to
> be primary key (or: together they are the primary key). How can I do
> this using SQL? Using pgAdminII for Postgres7.2.2 on RH8.
>
> Thanks
>
> Huub
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



pgsql-sql by date:

Previous
From: terry@greatgulfhomes.com
Date:
Subject: Re: primary keys
Next
From: Christoph Haller
Date:
Subject: Re: how to get the source table & field name of a view field