Re: Autoincremental value

From: Mage <mage(at)mage(dot)hu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Autoincremental value
Date: 2004-08-13 19:54:09
Message-ID: 411D1C61.8060007@mage.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

adburne(at)asocmedrosario(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-08-13 20:09:23 Re: Autoincremental value
Previous Message Ben 2004-08-13 19:53:23 Re: Autoincremental value