Re: [SQL] auto_increment? - Mailing list pgsql-sql

From David Rugge
Subject Re: [SQL] auto_increment?
Date
Msg-id 9910211213320C.02803@joplin
Whole thread Raw
In response to auto_increment?  (Rodrigo Bernardo Pimentel <rbp@pobox.com>)
List pgsql-sql
On Thu, 21 Oct 1999, you wrote:

>    When I noticed MySQL didn't have sequences, I cursed a lot. When I 
>found this out, though, I kept wondering if Postgres also had it, but I
>couldn't find any mention in the documentation. Does anyone know if something
>similar exists? Am I doing thins the hard way? Is there any other way of 
>automagically getting unique ids?
>    TIA,

Use the serial datatype. It automatically creates a sequence for you that
increments each time you do an insert,
-- 
-David Rugge

http://www.mindspring.com/~davidrugge/index.html


pgsql-sql by date:

Previous
From: Oleg Broytmann
Date:
Subject: Re: [SQL] auto_increment?
Next
From: Bruce De Vries
Date:
Subject: Search parameter optimization