Re: Equivalent for AUTOINCREMENT? - Mailing list pgsql-general

From Michael Hall
Subject Re: Equivalent for AUTOINCREMENT?
Date
Msg-id 20081031014554.GB22962@server1.jarvisstreet.com
Whole thread Raw
In response to Equivalent for AUTOINCREMENT?  (Michelle Konzack <linux4michelle@tamay-dogan.net>)
Responses Re: Equivalent for AUTOINCREMENT?  (Michelle Konzack <linux4michelle@tamay-dogan.net>)
List pgsql-general
> I have a table where I have a serialnumber which shuld be  increased  be
> each INSERT.  I know I can use max() to get the highest number, but  how
> can I use it in a INSERT statement?

Have a look in the manual for the SERIAL data type.
For fields with a SERIAL data type, you can use DEFAULT in an INSERT statement.


pgsql-general by date:

Previous
From: "Thomas Samson"
Date:
Subject: Re: Are there plans to add data compression feature to postgresql?
Next
From: "tomas.kejzlar@gmail.com"
Date:
Subject: plruby on windows