pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Muhyiddin A.M Hayat <middink@indo.net.id>
Cc: pgsql-sql@postgresql.org
Subject: Re: auto_increment
Date: Sat, 20 Sep 2003 07:23:15 +0100
Message-ID: <1064038995.5359.70.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <008501c37f35$832e26e0$1f00a8c0@middinkcomp>
References: <008501c37f35$832e26e0$1f00a8c0@middinkcomp>

On Sat, 2003-09-20 at 06:10, Muhyiddin A.M Hayat wrote:
> How to Create auto_increment field in PostreSQL.
> Can I create them using Trigger.

Use the SERIAL datatype.  See also the functions nextval(), currval()
and setval().

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "But my God shall supply all your need according to his
      riches in glory by Christ Jesus."     Philippians 4:19




view thread (27+ messages)  latest in thread

Message-ID: <1064038995.5359.70.camel@linda.lfix.co.uk>
Permalink:  ../1064038995.5359.70.camel@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/1064038995.5359.70.camel@linda.lfix.co.uk

 · 

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-sql@postgresql.org
  Cc: olly@lfix.co.uk, middink@indo.net.id
  Subject: Re: auto_increment
  In-Reply-To: <1064038995.5359.70.camel@linda.lfix.co.uk>

* 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