Re: Auto_Increment

From: Jason Hihn <jhihn(at)paytimepayroll(dot)com>
To: Stephane Pinel <spinel(at)noos(dot)fr>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Auto_Increment
Date: 2003-08-12 17:49:29
Message-ID: NGBBLHANMLKMHPDGJGAPOEFHCMAA.jhihn@paytimepayroll.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

SERIAL

Though, there is a small change - this will create a sequence for you, and
in MySQL you could get the value that it assigned.

In Posgres you have to begin a transaction, insert the record, select
CURRVAL('sequence_name'); {read result} then commit the transaction.

> -----Original Message-----
> From: pgsql-novice-owner(at)postgresql(dot)org
> [mailto:pgsql-novice-owner(at)postgresql(dot)org]On Behalf Of Stephane Pinel
> Sent: Saturday, August 09, 2003 10:44 AM
> To: pgsql-novice(at)postgresql(dot)org
> Subject: [NOVICE] Auto_Increment
>
>
> What is the pgsql equivalent keyword for the MySQL auto_increment
> keyword ?
>
> Thanks.
>
> Regards.
>
> Stephane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bradley J. Bartram 2003-08-12 19:21:27 Maximum Number of Function Arguments
Previous Message Bryan Bulten 2003-08-11 16:34:09 Re: error: table does not exist