Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B7D889FB2C6 for ; Mon, 19 Mar 2007 23:28:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 13785-03 for ; Mon, 19 Mar 2007 23:28:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 7CED79FB2A6 for ; Mon, 19 Mar 2007 23:28:43 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l2K2Si10006592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Mar 2007 19:28:45 -0700 Message-ID: <45FF4715.4000305@commandprompt.com> Date: Mon, 19 Mar 2007 19:29:41 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: "gunartha.nyoman" CC: pgsql-admin@postgresql.org Subject: Re: how to create field auto increas value References: <001901c76a9a$5f6ff8b0$fd0010b2@idas> In-Reply-To: <001901c76a9a$5f6ff8b0$fd0010b2@idas> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.5/2865/Sun Mar 18 08:27:48 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 19 Mar 2007 19:28:45 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/128 X-Sequence-Number: 24952 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/