Re: [HACKERS] Re: [SQL] SQL-Query 2 get primary key
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
To: "D'Arcy J.M. Cain" <darcy@druid.net>
Cc: Marc Grimme <grimme@atix.de>, Postgres Hackers List <hackers@postgresql.org>
Date: 1999-02-20T16:17:19Z
Lists: pgsql-hackers
> > if I create a table like this:
> > CREATE TABLE test (
> > id decimal(3) primary key,
> > name varchar(32));
<snip>
> Note that this makes the assumption that only one field can be in the
> primary key (no complex primary keys) but I don't think there will
> ever be more than one the way we declare it now.
fyi, the following syntax is allowed:
CREATE TABLE test (
id decimal(3),
name varchar(32),
primary key(id));
and multiple columns can be declared as primary keys.
- Tom