Re: Autoincremental value - Mailing list pgsql-general

From Mage
Subject Re: Autoincremental value
Date
Msg-id 411D1C61.8060007@mage.hu
Whole thread Raw
In response to Autoincremental value  (adburne@asocmedrosario.com.ar)
Responses Re: Autoincremental value  (adburne@asocmedrosario.com.ar)
List pgsql-general
adburne@asocmedrosario.com.ar wrote:

>when insert rows:
>
>insert into table1 (field1) values (1);
>insert into table1 (field1) values (1);
>insert into table1 (field1) values (2);
>
>and then select * from table1, you get:
>field1| field2
>------+-------
>  1   |  1
>  1   |  2
>  2   |  1
>------+-------
>
>
Do you mean:


 field1| field2
 ------+-------
   1   |  1
   1   |  2
   2   |  3
 ------+-------

You need the serial type.

          Mage

--
http://mage.hu


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Autoincremental value
Next
From: Ben
Date:
Subject: Re: Autoincremental value