Re: [SQL] auto_increment?

Поиск
Список
Период
Сортировка
От David Rugge
Тема Re: [SQL] auto_increment?
Дата
Msg-id 9910211213320C.02803@joplin
обсуждение исходный текст
Ответ на auto_increment?  (Rodrigo Bernardo Pimentel <rbp@pobox.com>)
Список 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 по дате отправления:

Предыдущее
От: Oleg Broytmann
Дата:
Сообщение: Re: [SQL] auto_increment?
Следующее
От: Bruce De Vries
Дата:
Сообщение: Search parameter optimization