pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Select into
Date: Wed, 5 Dec 2001 20:18:51 -0800 (PST)
Message-ID: <20011205201736.Y20601-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <GNELIHDDFBOCMGBFGEFOKEKLCAAA.chriskl@familyhealth.com.au>


On Thu, 6 Dec 2001, Christopher Kings-Lynne wrote:

> Hi All,
>
> Is it possible to insert into a table based on a select from another table?
>
> The docs for SELECT INTO and like seem to imply you can only create a table
> based on a select, not append to an existing table.
>
> How do you do this?

I think you can use
INSERT INTO <table>(<cols>) SELECT ...





view thread (43+ messages)  latest in thread

Message-ID: <20011205201736.Y20601-100000@megazone23.bigpanda.com>
Permalink:  ../20011205201736.Y20601-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011205201736.Y20601-100000@megazone23.bigpanda.com

 · 

reply

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: sszabo@megazone23.bigpanda.com, chriskl@familyhealth.com.au
  Subject: Re: Select into
  In-Reply-To: <20011205201736.Y20601-100000@megazone23.bigpanda.com>

* 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