pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: gunartha.nyoman <gunartha.nyoman@ptjas.co.id>
Cc: pgsql-admin@postgresql.org
Subject: Re: how to create field auto increas value
Date: Mon, 19 Mar 2007 19:29:41 -0700
Message-ID: <45FF4715.4000305@commandprompt.com> (raw)
In-Reply-To: <001901c76a9a$5f6ff8b0$fd0010b2@idas>
References: <001901c76a9a$5f6ff8b0$fd0010b2@idas>

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/




view thread (3+ messages)  latest in thread

Message-ID: <45FF4715.4000305@commandprompt.com>
Permalink:  ../45FF4715.4000305@commandprompt.com/
Also on:    postgresql.org/message-id/45FF4715.4000305@commandprompt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jd@commandprompt.com, gunartha.nyoman@ptjas.co.id
  Subject: Re: how to create field auto increas value
  In-Reply-To: <45FF4715.4000305@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox