Re: Automatic increment

Поиск
Список
Период
Сортировка
От GH
Тема Re: Automatic increment
Дата
Msg-id 20010111212008.A76801@over-yonder.net
обсуждение исходный текст
Ответ на Automatic increment  ("Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>)
Список pgsql-php
On Thu, Jan 11, 2001 at 07:09:08PM -0800, some SMTP stream spewed forth:
> Hi--
>
> Some of you guys suggested to use the 'SERIAL' type for a field that needs
> to be AUTOMATICALLY INCREASED BY 1 by PGSQL without user intervention, but
> it doesn't seem to work.  What am I doing wrong?

I know obviously not what query you are using, but here is an example:

create table example (col1 serial col2 <whatever>);
insert into example (col2) values ('whatever');
select * from example;

example
col1 | col2
-----+------------
   1 |  whatever


The initial value of a serial column is "1".


gh

>
> Julio Cuz, Jr.
> Riverside Community College
> jcuz@rccd.cc.ca.us
>

В списке pgsql-php по дате отправления:

Предыдущее
От: Stephen van Egmond
Дата:
Сообщение: Re: Automatic increment
Следующее
От: GH
Дата:
Сообщение: Re: Automatic increment