[SQL] how to use nextval()

2002-07-05 Thread juerg . rietmann
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

Re: [SQL] how to use nextval()

2002-07-05 Thread Stephane Schildknecht
Le ven 05/07/2002 à 14:03, [EMAIL PROTECTED] a écrit : > 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