how to use nextval()

From: juerg(dot)rietmann(at)pup(dot)ch
To: pgsql-sql(at)postgresql(dot)org
Subject: how to use nextval()
Date: 2002-07-05 12:03:04
Message-ID: OF5CD8DD5B.CD18AF26-ONC1256BED.0041BE98-C1256BED.00422F9C@pup.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello there

I have an idea how to solve my problem on copy a record to a new one in the
same table. To do so I need the next value for the primary key.

Using :

select nextval('pk_auftrag') as nextkey from auftrag;

I get an error like : Relation pk_auftrag does not exist !

Thanks for any help ... jr

__________________________________________________

PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland

internet : www.pup.ch
phone : +4141 790 4040
fax : +4141 790 2545
mobile : +4179 211 0315
__________________________________________________

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chantal Ackermann 2002-07-05 12:08:42 Re: Selecting data from a table created in another database...
Previous Message Rajesh Kumar Mallah. 2002-07-05 11:59:42 Is Dropping a column "CHECK" constraint possible?