Re: auto_increment

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: "Muhyiddin A(dot)M Hayat" <middink(at)indo(dot)net(dot)id>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: auto_increment
Date: 2003-09-20 06:23:15
Message-ID: 1064038995.5359.70.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message shyamperi 2003-09-20 06:24:34 Error with functions
Previous Message Muhyiddin A.M Hayat 2003-09-20 05:10:10 auto_increment