| From: | David Rugge <davidrugge(at)mindspring(dot)com> |
|---|---|
| To: | Rodrigo Bernardo Pimentel <rbp(at)pobox(dot)com>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: [SQL] auto_increment? |
| Date: | 1999-10-21 16:12:26 |
| Message-ID: | 9910211213320C.02803@joplin |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Broytmann | 1999-10-21 16:12:30 | Re: [SQL] auto_increment? |
| Previous Message | Rodrigo Bernardo Pimentel | 1999-10-21 15:44:52 | auto_increment? |