Re: Auto_Increment - Mailing list pgsql-novice

From Jason Hihn
Subject Re: Auto_Increment
Date
Msg-id NGBBLHANMLKMHPDGJGAPOEFHCMAA.jhihn@paytimepayroll.com
Whole thread Raw
In response to Auto_Increment  (Stephane Pinel <spinel@noos.fr>)
List 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@postgresql.org
> [mailto:pgsql-novice-owner@postgresql.org]On Behalf Of Stephane Pinel
> Sent: Saturday, August 09, 2003 10:44 AM
> To: pgsql-novice@postgresql.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
>


pgsql-novice by date:

Previous
From: Bryan Bulten
Date:
Subject: Re: error: table does not exist
Next
From: "Bradley J. Bartram"
Date:
Subject: Maximum Number of Function Arguments