From: David Rugge <davidrugge@mindspring.com>
To: Rodrigo Bernardo Pimentel <rbp@pobox.com>
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] auto_increment?
Date: Thu, 21 Oct 1999 12:12:26 -0400
Message-ID: <9910211213320C.02803@joplin> (raw)
In-Reply-To: <19991021134452.E25861@pobox.com>
References: <19991021134452.E25861@pobox.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: davidrugge@mindspring.com, rbp@pobox.com
Subject: Re: [SQL] auto_increment?
In-Reply-To: <9910211213320C.02803@joplin>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox