Re: Auto Increment

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: Postgres Users <pgsql-general(at)postgresql(dot)org>
Subject: Re: Auto Increment
Date: 2000-12-27 01:59:12
Message-ID: Pine.LNX.4.30.0012262052360.16141-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 26 Dec 2000 postgres(at)flipper(dot)webdevelop(dot)net wrote:

> Is there a way set a primary key to Auto Increment like you can
> with MySQL?

See the documentation on CREATE SEQUENCE, and also on CREATE TABLE and the
SERIAL type.

[An aside: this is something definitely that qualifies as a frequently
asked question, as this is like the 4th time in a week this question has
been asked. Would posting a FAQ list on a regular basis to the list be
helpful for things like this, like is done on the Perl newsgroups?]

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Hanson's Treatment of Time:
There are never enough hours in a day, but always too many days
before Saturday.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anand Raman 2000-12-27 03:16:44 Re: Tuning Database
Previous Message Oliver Elphick 2000-12-27 01:18:23 Re: Auto Increment