Re: primary keys

From: "Sangeetha Rao" <srao(at)carolina(dot)rr(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: primary keys
Date: 2002-11-07 15:12:59
Message-ID: HDELJLNGPHNPMMKLDPOBOEMECBAA.srao@carolina.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How do you select these sub Primary Keys?
I tried using Shift-Select, Ctrl_Selec, but doesn't work.
Thanks
Sangeetha

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of
terry(at)greatgulfhomes(dot)com
Sent: Thursday, November 07, 2002 8:54 AM
To: 'Huub'; pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] primary keys

A table can only have ONE primary key. It can have additional indexes with
a UNIQUE restriction, thereby forcing the second field to be as good as a
primary key.

That is probably what you are looking for, however, you can also in PG Admin
II select multiple fields as being the member of the primary key.

Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
terry(at)greatgulfhomes(dot)com

> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Huub
> Sent: Wednesday, November 06, 2002 9:19 AM
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] primary keys
>
>
> 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
>

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-11-07 15:16:21 Re: cast lo to oid
Previous Message Ken Kennedy 2002-11-07 15:08:17 Re: how to get the source table & field name of a view field