how to create field auto increas value
how to create field auto increas value
От:
"gunartha.nyoman" <gunartha.nyoman@ptjas.co.id>
Дата:
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.
Thank a lot for your attention
Regards,
Nyoman/Bali
Re: how to create field auto increas value
Look at the "serial" data type in the documentation.
~p
On Tue, 2007-03-20 at 09:49 +0700, gunartha.nyoman wrote:
~p
On Tue, 2007-03-20 at 09:49 +0700, 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.
Thank a lot for your attention
Regards,
Nyoman/Bali
Re: how to create field auto increas value
От:
"Joshua D. Drake" <jd@commandprompt.com>
Дата:
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/