Re: [SQL] insert into / select from / serial problem

2005-08-15 Thread PFC
On Wed, 10 Aug 2005 05:03:47 +0200, tgh002 <[EMAIL PROTECTED]> wrote: I am using a insert statement like: INSERT INTO newtable SELECT field1, field2 FROM anothertable newtable structure is: serial, varchar, varchar What syntax do I use to insert the serial field? Ive tried something like:

Re: [SQL] insert into / select from / serial problem

2005-08-14 Thread Tom Lane
"tgh002" <[EMAIL PROTECTED]> writes: > I am using a insert statement like: > INSERT INTO newtable > SELECT field1, field2 FROM anothertable > newtable structure is: serial, varchar, varchar > What syntax do I use to insert the serial field? I think you want to just let it default, which you'd do

[SQL] insert into / select from / serial problem

2005-08-14 Thread tgh002
I am using a insert statement like: INSERT INTO newtable SELECT field1, field2 FROM anothertable newtable structure is: serial, varchar, varchar What syntax do I use to insert the serial field? Ive tried something like: INSERT INTO newtable SELECT nextval('newtable_id_seq'), field1, field2 FRO