Re: Auto_Increment - Mailing list pgsql-novice

From Peter Childs
Subject Re: Auto_Increment
Date
Msg-id 200308091716.47530.Blue.Dragon@blueyonder.co.uk
Whole thread Raw
In response to Auto_Increment  (Stephane Pinel <spinel@noos.fr>)
List pgsql-novice
On Saturday 09 August 2003 15:44, Stephane Pinel wrote:
> What is the pgsql equivalent keyword for the MySQL auto_increment
> keyword ?

serial. (For the short answer) To be quick. ie

CREATE table x (a serial);

or

CREATE SEQUENCE a_seq;
ALTER TABLE x ALTER a SET DEFAULT next_val('a_seq');


>
> Thanks.
>
> Regards.
>
> Stephane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org


Peter Childs

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Upgrade 7.2 to 7.3
Next
From: "John T. Yocum"
Date:
Subject: Re: CURRENT TIME causes server to shutdown connection