Re: How to autoincrement a primary key... - Mailing list pgsql-sql

From Andrew Chilton
Subject Re: How to autoincrement a primary key...
Date
Msg-id a364f6fa0609221500k2ebd88c1q934385ee6856cb50@mail.gmail.com
Whole thread Raw
In response to Re: How to autoincrement a primary key...  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-sql
On 23/09/06, Richard Broersma Jr <rabroersma@yahoo.com> wrote:
> Is just shorthand notation for:
>
> CREATE SEQUENCE foo START 1;
> CREATE TABLE bar (id integer PRIMARY KEY DEFAULT nextval('bar'));

Doug, just a slight typo correction in that second line Richard gave
you (bar should be foo), it should read in full:

CREATE SEQUENCE foo START 1;
CREATE TABLE bar (id integer PRIMARY KEY DEFAULT nextval('foo'));

Andy

-- 
name: Andrew Chilton
web: http://kapiti.geek.nz/


pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: How to autoincrement a primary key...
Next
From: Thomas Kellerer
Date:
Subject: Re: How to autoincrement a primary key...