Re: Automatic increment - Mailing list pgsql-php

From GH
Subject Re: Automatic increment
Date
Msg-id 20010111212008.A76801@over-yonder.net
Whole thread Raw
In response to Automatic increment  ("Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>)
List 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 by date:

Previous
From: Stephen van Egmond
Date:
Subject: Re: Automatic increment
Next
From: GH
Date:
Subject: Re: Automatic increment