Re: [GENERAL] Still the problem with the autoincrement field

From: Kevin Heflin <kheflin(at)shreve(dot)net>
To: Marc Eggenberger <me(at)ieo(dot)ch>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Still the problem with the autoincrement field
Date: 1998-10-06 09:57:01
Message-ID: Pine.LNX.4.02.9810060452190.20159-100000@mercury.shreve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Tue, 6 Oct 1998, Marc Eggenberger wrote:

>
> and when I want to add some data .. how to do this?
> when I do the following:
>
> insert into offene_stellen values ('', 'Maurer', 'Buchs', 'Rheinhalter Claudio', 'flexibilitaet', 'gutes Team');
>
> the id field is always 0, and when I do a:
>
> insert into offene_stellen values ('Maurer', 'Buchs', 'Rheinhalter Claudio', 'flexibilitaet', 'gutes Team');

Not exactly sure what the problem is here.. but you should not have to
call on the increment sequence at all durring the insert.. it's automatic

Maybe it's because you are not specifying which fields to insert into like
so:

insert into table_name (field1, field2, field3, field4)
values ('data1', 'data2', 'data3', 'data4');

Kevin

--------------------------------------------------------------------
Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
VP/Mac Tech | 333 Texas St #619 | FAX:318.221.6612
kheflin(at)shreve(dot)net | Shreveport, LA 71101 | http://www.shreve.net
--------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 1998-10-06 10:08:23 Re: [GENERAL] Still the problem with the autoincrement field
Previous Message Marc Eggenberger 1998-10-06 09:29:39 Still the problem with the autoincrement field

Browse pgsql-sql by date

  From Date Subject
Next Message Herouth Maoz 1998-10-06 10:08:23 Re: [GENERAL] Still the problem with the autoincrement field
Previous Message Marc Eggenberger 1998-10-06 09:29:39 Still the problem with the autoincrement field