Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

Next:From: Anand RamanDate: 2000-12-27 03:16:44
Subject: Re: Tuning Database
Previous:From: Oliver ElphickDate: 2000-12-27 01:18:23
Subject: Re: Auto Increment

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group