From: PFC <lists@boutiquenumerique.com>
To: tgh002 <arnulfh@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: insert into / select from / serial problem
Date: Mon, 15 Aug 2005 09:49:56 +0200
Message-ID: <op.svjhdiy1th1vuj@localhost> (raw)
In-Reply-To: <1123643026.939110.310310@g47g2000cwa.googlegroups.com>
References: <1123643026.939110.310310@g47g2000cwa.googlegroups.com>
On Wed, 10 Aug 2005 05:03:47 +0200, tgh002 <arnulfh@gmail.com> 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:
Try :
INSERT INTO newtable (col1, col2) SELECT field1, field2 FROM anothertable
col1, col2 being the names of your columns that you want to put field1 and
field2 into...
The serial will take care of itself.
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: lists@boutiquenumerique.com, arnulfh@gmail.com
Subject: Re: insert into / select from / serial problem
In-Reply-To: <op.svjhdiy1th1vuj@localhost>
* 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