pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPrimary Keys
4+ messages / 4 participants
[nested] [flat]
* Primary Keys
@ 2001-04-30 21:20 Brian Z <brian0@verizon.net>
2001-05-01 15:13 ` Re: Primary Keys Thomas F. O'Connell <tfo@monsterlabs.com>
2001-05-05 13:15 ` RE: [ADMIN] Primary Keys Christian Marschalek <cm@chello.at>
2001-05-07 09:04 ` Re: Primary Keys Einar Karttunen <ekarttun@cs.Helsinki.FI>
0 siblings, 3 replies; 4+ messages in thread
From: Brian Z @ 2001-04-30 21:20 UTC (permalink / raw)
To: pgsql-admin@postgresql.org.pgsql-general
How can you create a Primary Key which contains multiple columns on for a
table.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Primary Keys
2001-04-30 21:20 Primary Keys Brian Z <brian0@verizon.net>
@ 2001-05-01 15:13 ` Thomas F. O'Connell <tfo@monsterlabs.com>
2 siblings, 0 replies; 4+ messages in thread
From: Thomas F. O'Connell @ 2001-05-01 15:13 UTC (permalink / raw)
To: pgsql-admin@postgresql.org.pgsql-general
Brian Z wrote:
> How can you create a Primary Key which contains multiple columns on for a
> table.
first of all, i recommend checking out the syntax for the CREATE TABLE
command. it's available here:
http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/sql-createtable.html
for a quick example, though:
create table foo (
bar int4,
baz int4,
ola int4,
primary key( bar, baz )
);
this statement will make the columns bar and baz coincidentally the
primary key for the table foo.
-tfo
^ permalink raw reply [nested|flat] 4+ messages in thread
* RE: [ADMIN] Primary Keys
2001-04-30 21:20 Primary Keys Brian Z <brian0@verizon.net>
@ 2001-05-05 13:15 ` Christian Marschalek <cm@chello.at>
2 siblings, 0 replies; 4+ messages in thread
From: Christian Marschalek @ 2001-05-05 13:15 UTC (permalink / raw)
To: 'Brian Z' <brian0@verizon.net>; +Cc: [GENERAL] PostgreSQL <pgsql-general@postgresql.org>
I'll quote Thomas F.O'Connell on this one as it has been discussed just
some days ago:
<quote>
first of all, i recommend checking out the syntax for the CREATE TABLE
command. it's available here:
http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/sql-cre
atetable.html
for a quick example, though:
create table foo (
bar int4,
baz int4,
ola int4,
primary key( bar, baz )
);
this statement will make the columns bar and baz coincidentally the
primary key for the table foo.
-tfo
</quote>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Brian Z
> Sent: Monday, April 30, 2001 11:21 PM
> To: pgsql-admin@postgresql.org.pgsql-general@postgresql.org
> Subject: [ADMIN] Primary Keys
>
>
> How can you create a Primary Key which contains multiple
> columns on for a table.
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an
> appropriate subscribe-nomail command to
> majordomo@postgresql.org so that your message can get through
> to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Primary Keys
2001-04-30 21:20 Primary Keys Brian Z <brian0@verizon.net>
@ 2001-05-07 09:04 ` Einar Karttunen <ekarttun@cs.Helsinki.FI>
2 siblings, 0 replies; 4+ messages in thread
From: Einar Karttunen @ 2001-05-07 09:04 UTC (permalink / raw)
To: Brian Z <brian0@verizon.net>; +Cc: pgsql-general@postgresql.org
On Mon, 30 Apr 2001, Brian Z wrote:
> How can you create a Primary Key which contains multiple columns on for a
> table.
>
CREATE TABLE foo (
col1 integer,
col2 text,
col3 timestamp,
PRIMARY KEY (col1,col2)
);
Creates the primary key on columns col1 and col2. Please see the
documentation for CREATE TABLE for further information.
- Einar Karttunen
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-05-07 09:04 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-04-30 21:20 Primary Keys Brian Z <brian0@verizon.net>
2001-05-01 15:13 ` Thomas F. O'Connell <tfo@monsterlabs.com>
2001-05-05 13:15 ` Christian Marschalek <cm@chello.at>
2001-05-07 09:04 ` Einar Karttunen <ekarttun@cs.Helsinki.FI>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox