From: Tom Lane <tgl@sss.pgh.pa.us>
To: tgh002 <arnulfh@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: insert into / select from / serial problem
Date: Sun, 14 Aug 2005 20:33:11 -0400
Message-ID: <5013.1124065991@sss.pgh.pa.us> (raw)
In-Reply-To: <1123643026.939110.310310@g47g2000cwa.googlegroups.com>
References: <1123643026.939110.310310@g47g2000cwa.googlegroups.com>
"tgh002" <arnulfh@gmail.com> 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 with, say,
INSERT INTO newtable (fielda, fieldb)
SELECT field1, field2 FROM anothertable
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, arnulfh@gmail.com
Subject: Re: insert into / select from / serial problem
In-Reply-To: <5013.1124065991@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox