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: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of Brian Z
> Sent: Monday, April 30, 2001 11:21 PM
> To: [EMAIL PROTECTED]@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 
> [EMAIL PROTECTED] so that your message can get through 
> to the mailing list cleanly
> 


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to