Re: How to autoincrement a primary key...

From: "Andrew Chilton" <andychilton(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to autoincrement a primary key...
Date: 2006-09-22 22:00:29
Message-ID: a364f6fa0609221500k2ebd88c1q934385ee6856cb50@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 23/09/06, Richard Broersma Jr <rabroersma(at)yahoo(dot)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/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Kellerer 2006-09-22 22:12:00 Re: How to autoincrement a primary key...
Previous Message Richard Broersma Jr 2006-09-22 19:25:41 Re: How to autoincrement a primary key...