Re: how to create field auto increas value - Mailing list pgsql-admin

From Joshua D. Drake
Subject Re: how to create field auto increas value
Date
Msg-id 45FF4715.4000305@commandprompt.com
Whole thread Raw
In response to how to create field auto increas value  ("gunartha.nyoman" <gunartha.nyoman@ptjas.co.id>)
List pgsql-admin
gunartha.nyoman wrote:
> Dear All,
>
> I am trying to create table which have one field auto increas value like autonumber in ms access.
> My question is how to create this auto increas field.

create table foo (id serial);

also see currval(), nextval()

Sincerely,

Joshua D. Drake

>
> Thank a lot for your attention
>
> Regards,
> Nyoman/Bali
>
>
>


--

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


pgsql-admin by date:

Previous
From: Phillip Smith
Date:
Subject: Re: how to create field auto increas value
Next
From: Cesar Alvarez
Date:
Subject: Re: converting from Sybase to Postgres